I am trying to send agent information to a class selector and launch it. I wrote the code below, but I get the error ‘This invocation calls a function that has the ‘no_rollback’ effect, which is not allowed by its context.’ In this case, how should I call the function?
AllotClass(Agent : agent) : void =
if:
Player := player[Agent]
Pdt:player_data_table = PlayerDataMap[Player]
Tp :=Pdt.Tps
Rpt := Round[Tp]
CrtCls := Pdt.CrntClass
if(Rpt > CLS1STD):
if(Rpt > CLS2STD)
then:
# Other Processing
else:
if(CrtCls = 2)
then:
ClassSelector.ChangeClass(Player) # <-- Call here
else:
# Other Processing