// this script was compiled with wurst 1.8.1.0-jenkins-Wurst-1365 globals integer array List_nextFree integer List_firstFree=0 integer List_maxIndex=0 integer array List_typeId endglobals function initGlobals takes nothing returns nothing endfunction function error takes string msg returns nothing call BJDebugMsg(msg + "\n" + "") endfunction function new_List takes nothing returns integer local integer this local integer this_1 if List_firstFree == 0 then if List_maxIndex < 32768 then set List_maxIndex = List_maxIndex + 1 set this_1 = List_maxIndex set List_typeId[this_1] = 1 else call error("Out of memory: Could not create List.") set this_1 = 0 endif else set List_firstFree = List_firstFree - 1 set this_1 = List_nextFree[List_firstFree] set List_typeId[this_1] = 1 endif set this = this_1 return this endfunction function init_Test takes nothing returns nothing local integer fxs = new_List() local integer this = fxs if List_typeId[this] == 0 then if this == 0 then call error("Nullpointer exception when calling List.get") else call error("Called List.get 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