Tuchol
falania.com
Hello Otlanders,
I have problem with my script ...
and the error
I have problem with my script ...
Code:
function onUse(cid, item, frompos, item2, topos)
if item.uid == 10223 and item.itemid == 6227 then
if getPlayerStorageValue(cid, 51511, 1) then
doSummonCreature("Bat", {x = 1037, y = 979, z = 7})
return
doSummonCreature("Bat", {x = 1033, y = 980, z = 7}),
doSummonCreature("Bat", {x = 1035, y = 978, z = 7}),
doSummonCreature("Mutated Bat", {x = 1035, y = 982, z = 7})
doPlayerSetStorageValue(cid, 51512, 1)
else
doPlayerSendCancel(cid,"Talk with Dracula.")
end
end
return 1
end
and the error
Code:
[22:52:38.262] [Error - LuaInterface::loadFile] data/actions/scripts/bat.lua:9: 'end' expected (to close 'if' at line 3) near 'doPlayerSetStorageValue'
[22:52:38.262] [Warning - Event::loadScript] Cannot load script (data/actions/scripts/bat.lua)
[22:52:38.262] data/actions/scripts/bat.lua:9: 'end' expected (to close 'if' at line 3) near 'doPlayerSetStorageValue'