• 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 Tfs 0.3.4

Joined
Dec 22, 2007
Messages
1,984
Reaction score
2
Hello, I'm changing version from 0.3.2 to 0.3.4 but something doesn't work properly on 0.3.4 (it does on 0.3.2)

Code:
function onSay(cid, words, param)
   ccid = 2160
   removenugget = doPlayerRemoveItem(cid, 6527, 1)
	if removenugget == 1 then
		doPlayerAddItem(cid,ccid,100)
		doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "You have purchased 100 crystal coins!  Thank you for donating!")
		else
		doPlayerSendCancel(cid, "You do not have enough coins.")
		doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
end
end

What has been changed in the new version?
 
I don't know, I really don't and I can't find anything wrong with it. I guess you chould check your talkactins.xml and don't use:

Code:
script="script.lua"

Use:

Code:
event="script" type="script.lua"
 
@up
yes you are right.
You are not allowed to use 1 or 0 instead of TRUE or FALSE now.

so
PHP:
function onSay(cid, words, param)
   ccid = 2160
   removenugget = doPlayerRemoveItem(cid, 6527, 1)
	if removenugget == TRUE then
		doPlayerAddItem(cid,ccid,100)
		doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "You have purchased 100 crystal coins!  Thank you for donating!")
		else
		doPlayerSendCancel(cid, "You do not have enough coins.")
		doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
     end
return TRUE
end
 

Similar threads

Back
Top