Trying to load this gives startup error: Unknown identifier 'invoker'. (Anonymous functions still recognize invoker.)
Code: Select all
Class CITest : CustomInventory
{
States
{
Spawn:
CLIP A -1 NoDelay A_GiveInventory("Clip", randompick(2,4,8,16));
Stop;
Pickup:
TNT1 A 0 GiveIt;
Stop;
}
void GiveIt() //Works fine as anonymous function
{
A_LogInt(invoker.CountInv("Clip"));
A_SetInventory("Clip", invoker.CountInv("Clip"));
}
}