I have a problem to some part of my script, my bots are giving error
Quote
LUA ERROR (ai_onspawn): attempt to call a nil value
Freezing bots to stop Lua error msg flood! Use 'bot_freeze 0' to unfreeze bots!
Freezing bots to stop Lua error msg flood! Use 'bot_freeze 0' to unfreeze bots!
And the error is in this function:
1
2
3
4
5
6
7
8
9
10
2
3
4
5
6
7
8
9
10
function SetBot() if (BotID == 0) then parse("bot_add") 	for _,i in pairs(player(0,"table")) do 		if player(i, "exists") and player(i, "bot") then 			BotID = i 			parse("setname "..i.." "..BotName) end;end;end;end SetBot()
Quick help