Luka Trklja
Member
Struggling with the refill talkaction, could anyone make one for me?
Currently all I have is this, not sure how correct that is, still new and learning
TFS 0.3.6 8.6
And this is the error I get
Currently all I have is this, not sure how correct that is, still new and learning
TFS 0.3.6 8.6
Lua:
local config = {
soft = 6132,
worn = 10021
}
function onSay(cid, words, param)
if doPlayerRemoveItem(cid, config.worn, 1)) == TRUE then doPlayerAddItem(cid, config.soft, 1) and doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You recharged your soft boots!")
else
doPlayerSendCancel(cid, "You dont have soft boots!"
end
end
And this is the error I get
Code:
[Error - LuaScriptInterface::loadFile] data/talkactions/scripts/softboots.lua:45: 'then' expected near ')'
[Warning - Event::loadScript] Cannot load script (data/talkactions/scripts/softboots.lua)
data/talkactions/scripts/softboots.lua:45: 'then' expected near ')'