i have added a function to the frikbots to select a weaponclass i added to my mod...
it compiled fine with FrikQC but not with FTEQCC, FTEQCC give me this errormessage:
in function botConnect (line 132),
frikbot/bot.qc:728: error: "=" - not a name
The code looks like this and is inside bot.qc in botconnect....
Code: Select all
local float class;
class = ceil(random() * 10);
if (class == 1)
self.impulse = 120;
else if (class == 2)
self.impulse = 121;
else if (class == 3)
self.impulse = 122;
else if (class == 4)
self.impulse = 123;
else if (class == 5)
self.impulse = 124;
else if (class == 6)
self.impulse = 125;
else if (class == 7)
self.impulse = 126;
else if (class == 8)
self.impulse = 127;
else if (class == 9)
self.impulse = 128;
else
self.impulse = 129;
PreImpulse();
Did i anything wrong? it works with FrikQC, an the bots are getting their class but i need FTEQCC for some things like the vweapon code...
Thanks and greetings