• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

Solved !bless error

Akainu92

New Member
Joined
Dec 22, 2014
Messages
6
Reaction score
0
hello,
i need some help with an error which i get after typing "!bless" in game.
this is the script i'm using in data/talkactions/scripts/bless.lua:
LUA:
local bless = {1, 2, 3, 4, 5}
local cost = 50000 -- Cost in gp.

function onSay(cid, words, param)
for i = 1, table.maxn(bless) do
if(getPlayerBlessing(cid, bless[I])) then
doPlayerSendCancel(cid, "You already have all blessings.")
return TRUE
end
end

if(doPlayerRemoveMoney(cid, cost) == TRUE) then
for i = 1, table.maxn(bless) do
doPlayerAddBlessing(cid, bless[I])
end
doPlayerSendTextMessage(cid,24, "You have bought all blessings.")
doSendMagicEffect(getPlayerPosition(cid), 28)
else
doPlayerSendCancel(cid, "You don't have enough money.")
end
return TRUE
end
[/I][/I]

this is what i've added on the file talkactions.xml:
<talkaction words="!bless" script="bless.lua"/>

I'm running TFS 1.1 on windows 7 64bit, this is the server:
http://otland.net/threads/best-rele...ests-optimized-bug-fixing-open-source.204514/

this is the error i get:
error bless.png

If you may tell me how to fix it, i'd really appreciate thanks in advance
 
Back
Top