I’m confused as to why I can’t set the value of my TotalPlayerEliminations map. I get this syntax error “This invocation calls a function that has the ‘decides’ effect, which is not allowed by its context”. I assume I need some kind of weird ? operator, but I’m still trying to figure out how all that owrks.
var InitialLoadoutWeaponGranter : item_granter_device = item_granter_device{}
@editable
var PlayerSpawner : player_spawner_device = player_spawner_device{}
var TotalPlayerEliminations : [player]int = map{}
# Runs when the device is started in a running game
OnBegin<override>()<suspends>:void=
# TODO: Replace this with your code
Print("Starting the Combat Pro Trainer")
PlayerSpawner.SpawnedEvent.Subscribe(OnPlayerSpawn)
Print("subscribed to spawn event")
OnPlayerSpawn(InPlayer : agent) : void =
Print("A Player just spawned!")
InitialLoadoutWeaponGranter.GrantItem(InPlayer)
set TotalPlayerEliminations[InPlayer] = 0