Forum

> > CS2D > Scripts > fai_collect : error tactical shield/ammo ?
Forums overviewCS2D overview Scripts overviewLog in to reply

English fai_collect : error tactical shield/ammo ?

2 replies
To the start Previous 1 Next To the start

old fai_collect : error tactical shield/ammo ?

LoaderFRA
User Off Offline

Quote
Hello every one,
I "upgrade" bots by myself and my bots collect ammo if bots don't have ammo (working).

But when bots collect Tactical Shield, CS2D give a error :
1
2
3
LUA ERROR: bots/includes/collect.lua:62: attempt to call global 'weapon' (a nil value)
 -> bots/includes/collect.lua:62: in function 'fai_collect'
 -> bots/Standard AI.lua:110: in function <bots/Standard AI.lua:85>

Maybe, tactical shield give error because he don't need ammo to work and bots think and try, and give error for that.

I use this "code":
1
elseif itype>=61 and itype<=62 and weapon(id,"ammoin")==0 then

How fix that ?
Thanks for advance.
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview