[Dev 2513] Error: unexpected arg "nil" passed to get_player_id()

I think i finally broke it…
after reloading my latest savegame from my RAM Stress test the game welcomed me with 307 (!!!) errors to my face

306 of them being this one

develop-2513 (x64)
radiant/modules/entities.luac:75: unexpected arg "nil" passed to get_player_id()
stack traceback:
	[C]: ?
	[C]: in function 'error'
	radiant/modules/entities.luac:75: in function 'get_player_id'
	stonehearth/lib/player/relations.luac:28: in function 'are_players_hostile'
	...onehearth/services/server/player/player_service.luac:25: in function 'are_players_hostile'
	...h/services/server/population/population_faction.luac:73: in function '_get_threat_level'
	...h/services/server/population/population_faction.luac:77: in function '_on_seen_by'
	...h/services/server/population/population_faction.luac:70: in function <...h/services/server/population/population_faction.luac:70>
	[C]: in function 'push_object_state'
	...h/services/server/population/population_faction.luac:70: in function '_monitor_citizen'
	...h/services/server/population/population_faction.luac:10: in function 'self'
	radiant/modules/events.luac:80: in function <radiant/modules/events.luac:78>
	[C]: in function 'xpcall'
	radiant/modules/events.luac:78: in function <radiant/modules/events.luac:70>

and the 307th was an old “friend” …the attempt to index local ‘entity’ (a nil value)

well… could be one of these :stuck_out_tongue:

2 Likes

Fixed for the next build. Thanks!

3 Likes