Please replace that 255 with 'Screen->NumEWeapons()'