watkins577
As3, lua, xml scripter
- Joined
- Sep 20, 2008
- Messages
- 130
- Reaction score
- 0
I get this error for my script
This is my script (notice it has no weird y in it).
Thanks for any help .
Code:
[27/09/2009 23:16:07] [Warning - Event::loadScript] Cannot load script (data/movements/scripts/beginitems.lua)
[27/09/2009 23:16:07] data/movements/scripts/beginitems.lua:1: unexpected symbol near 'ÿ'
[27/09/2009 23:16:07] [Warning - Event::loadScript] Cannot load script (data/movements/scripts/beginitems.lua)
[27/09/2009 23:16:07] data/movements/scripts/beginitems.lua:1: unexpected symbol near 'ÿ'
Code:
local config = {
items = {
itemss = {8820, 2661, 1988, 8819, 2190, 2175, 2468, 2643},
itemsd = {8820, 2661, 1988, 8819, 2182, 2175, 2468, 2643},
itemsp = {2480, 2661, 1988, 2660, 2456, 8923, 2544, 2643},
itemsk = {2481, 2661, 1988, 2465, 8602, 2509, 2478, 2643, 2439, 8601}
},
storage = {3000, 3001, 3002, 3003}
}
function onStepIn(cid, item, pos, frompos)
if item.actionid == config.storage[0] then
if getPlayerStorageValue(cid, config.storage[0]) == 0 then
if getPlayerVocation == 1 then
setPlayerStorageValue(cid, config.storage[0], 1)
for _, id in ipairs(config.items.itemss) do
doPlayerAddItem(cid, id, 1)
end
return TRUE
else
doPlayerSendCancel(cid, "You are not a Sorcerer!")
return FALSE
end
else
doPlayerSendCancel(cid, "You have already got these items!")
return FALSE
end
else if item.actionid == config.storage[1] then
if getPlayerStorageValue(cid, config.storage[1]) == 0 then
if getPlayerVocation == 2 then
setPlayerStorageValue(cid, config.storage[1], 1)
for _, id in ipairs(config.items.itemsd) do
doPlayerAddItem(cid, id, 1)
end
return TRUE
else
doPlayerSendCancel(cid, "You are not a Druid!")
return FALSE
end
else
doPlayerSendCancel(cid, "You have already got these items!")
return FALSE
end
else if item.actionid == config.storage[2] then
if getPlayerStorageValue(cid, config.storage[2]) == 0 then
if getPlayerVocation == 3 then
setPlayerStorageValue(cid, config.storage[2], 1)
for _, id in ipairs(config.items.itemsp) do
doPlayerAddItem(cid, id, 1)
end
return TRUE
else
doPlayerSendCancel(cid, "You are not a Paladin!")
return FALSE
end
else
doPlayerSendCancel(cid, "You have already got these items!")
return FALSE
end
else if item.actionid == config.storage[3] then
if getPlayerStorageValue(cid, config.storage[3]) == 0 then
if getPlayerVocation == 4 then
setPlayerStorageValue(cid, config.storage[3], 1)
for _, id in ipairs(config.items.itemsk) do
doPlayerAddItem(cid, id, 1)
end
return TRUE
else
doPlayerSendCancel(cid, "You are not a Knight!")
return FALSE
end
else
doPlayerSendCancel(cid, "You have already got these items!")
return FALSE
end
else
doPlayerSendCancel(cid, "This is broken :(")
return FALSE
end
end
Thanks for any help .