Zoe Skandinavia
Member
- Joined
- Jul 18, 2014
- Messages
- 193
- Solutions
- 2
- Reaction score
- 15
Hi, i have this error when a globalevent executes:
antibot.lua:5:attempt to index local 'player' <a nil value>
And this is the script:
Sometimes i saw that someones puts:
If not player then
return true
end
But i tried this and nothing happens, and if i put return false instead return true, in console appears: Failed to execute event: antibot.
Please help!.
Thanks
antibot.lua:5:attempt to index local 'player' <a nil value>
And this is the script:
Code:
function onThink(cid, player, interval)
local player = Player(cid)
if player:getStorageValue(76965) < 1 then
print("Bot inspection.")
doPlayerSendTextMessage(cid, 22, "You have 3 minutes to say !antibot or you going to get kicked.")
player:setStorageValue(76975, 1)
player:setStorageValue(76976, os.time()+180)
return true
end
if player:getStorageValue(76976) >= os.time() and player:getStorageValue(76975) == 1 then
doRemoveCreature(cid)
end
return true
end
Sometimes i saw that someones puts:
If not player then
return true
end
But i tried this and nothing happens, and if i put return false instead return true, in console appears: Failed to execute event: antibot.
Please help!.
Thanks
