This is my script, it works perfect without the condition stuff and I can't find any problems with it, would be great if someone can tell me what the problem is. :9
Error message:
:S
LUA:
local condition = createConditionObject(CONDITION_OUTFIT)
setConditionParam(condition, CONDITION_PARAM_TICKS, 20 * 1000)
addOutfitCondition(condition, 0, 329, 0, 0, 0, 0)
function onStepIn(cid, item, position, fromPosition)
if getGlobalStorageValue(9000) == 1 then
if getGlobalStorageValue(9002) >= getGlobalStorageValue(9001) then
doTeleportThing(cid, {x=4972, y=5072, z=9})
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_TELEPORT)
doSendMagicEffect(fromPosition, CONST_ME_POFF)
setPlayerStorageValue(cid, 9000, 1)
setGlobalStorageValue(9001, getGlobalStorageValue(9001)+1)
doAddCondition(cid, condition)
doPlayerSendTextMessage(cid, 28, "You joined the orcs!")
else
doTeleportThing(cid, fromPosition)
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF)
doPlayerSendTextMessage(cid, 28, "[AUTO-TEAMBALANCE] There are too many orcs!")
end
else
doTeleportThing(cid, fromPosition)
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF)
doPlayerSendTextMessage(cid, 28, "Capture the Flag is closed.")
end
return true
end
Error message:
[15/12/2009 19:27:56] Description:
[15/12/2009 19:27:56] attempt to index a number value
[15/12/2009 19:27:56] [Warning - Event::loadScript] Cannot load script (data/movements/scripts...]
:S
Last edited: