// this script was compiled with wurst 1.8.1.0-jenkins-Wurst-1365 globals integer array Test_nextFree integer Test_firstFree=0 integer Test_maxIndex=0 integer array Test_typeId endglobals function initGlobals takes nothing returns nothing endfunction function error takes string msg returns nothing call BJDebugMsg(msg + "\n" + "") endfunction function init_Test takes nothing returns nothing local integer this if Test_firstFree == 0 then if Test_maxIndex < 32768 then set Test_maxIndex = Test_maxIndex + 1 set this = Test_maxIndex set Test_typeId[this] = 2 else call error("Out of memory: Could not create Test_Test.") set this = 0 endif else set Test_firstFree = Test_firstFree - 1 set this = Test_nextFree[Test_firstFree] set Test_typeId[this] = 2 endif if Test_typeId[this] == 0 then if this == 0 then call error("Nullpointer exception when calling Test.call") else call error("Called Test.call on invalid object.") endif endif endfunction function main takes nothing returns nothing call initGlobals() call init_Test() endfunction function config takes nothing returns nothing endfunction