• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Lua help me script

MahmoudHashkel

New Member
Joined
Jul 23, 2019
Messages
5
Reaction score
0
Location
Egypt
function onUse(cid, item, fromPosition, itemEx, toPosition)
if getPlayerVocation(cid) == 5 then

doPlayerAddItem(cid, 3966)
doPlayerAddItem(doPlayerAddItem(cid, 2275)

doPlayerSendTextMessage(cid,19,"XD")
doSendAnimatedText(getThingPos(cid), "Yeah Exp With I tems!!", TEXTCOLOR_RED)

end
 
Last edited:
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
    if getPlayerVocation(cid) == 5 then
        doPlayerAddItem(cid, 3966)
        doPlayerAddItem(doPlayerAddItem(cid, 2275)
        doPlayerSendTextMessage(cid,19,"XD")
        doSendAnimatedText(getThingPos(cid), "Yeah Exp With I tems!!", TEXTCOLOR_RED)
    end
end
"end" closes loops (for), conditions (if) and function declaration (function x())
So you have to close if with end and then function with end.
 
data/actions/scripts/1212.lua has in data/actions/actions.xml "onUse" declared, but has not said function in 1212.lua file.
data/actions/scripts/reward.lua has some syntax error, you'll have to post whole script here.
data/talkactions/scripts/online.lua has in data/talkactions/talkactions.xml "onSay" declared, but has not said function in online.lua file.
data/movements/scripts/firstitemss.lua has some sytanx error, you'll have to post whole script here

TL;DR
Post here data/actions/scripts/1212.lua, actions.xml, data/actions/scripts/reward.lua, data/talkactions/scripts/online.lua, talkactions.xml anddata/movements/scripts/firstitemss.lua
but please describe which is which while posting
 
Back
Top