• 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!

problem in script changegold

Sir MoX

New Member
Joined
Jan 14, 2009
Messages
285
Reaction score
1
Hi i have a problem in the script of changegold that in the server when I change form 100gp to 1 platinum coin appears this text:

Code:
[06/08/2011 23:06:13] Lua Script Error: [Action Interface] 
[06/08/2011 23:06:13] data/actions/scripts/other/changegold.lua:onUse
[06/08/2011 23:06:13] luaDoSendAnimatedText(). Deprecated function.
[06/08/2011 23:06:13] stack traceback:
[06/08/2011 23:06:13] 	[C]: in function 'doSendAnimatedText'
[06/08/2011 23:06:13] 	data/actions/scripts/other/changegold.lua:5: in function <data/actions/scripts/other/changegold.lua:1>
 
Lua:
local coins = {
	[ITEM_GOLD_COIN] = {
		to = ITEM_PLATINUM_COIN, effect = TEXTCOLOR_YELLOW
	},
	[ITEM_PLATINUM_COIN] = {
		from = ITEM_GOLD_COIN, to = ITEM_CRYSTAL_COIN, effect = TEXTCOLOR_LIGHTBLUE
	},
	[ITEM_CRYSTAL_COIN] = {
		from = ITEM_PLATINUM_COIN, to = ITEM_SUPER_COIN, effect = TEXTCOLOR_TEAL
	},
	[ITEM_SUPER_COIN] = {
		from = ITEM_CRYSTAL_COIN, effect = TEXTCOLOR_WHITE
	}
}
 
function onUse(cid, item, fromPosition, itemEx, toPosition)
	if(getPlayerFlagValue(cid, PLAYERFLAG_CANNOTPICKUPITEM)) then
		return false
	end
 
	local coin = coins[item.itemid]
	if(not coin) then
		return false
	end
 
	if(coin.to ~= nil and item.type == ITEMCOUNT_MAX) then
		doChangeTypeItem(item.uid, item.type - item.type)
		doPlayerAddItem(cid, coin.to, 1)
		doSendAnimatedText(fromPosition, "$$$", coins[coin.to].effect)
	elseif(coin.from ~= nil) then
		doChangeTypeItem(item.uid, item.type - 1)
		doPlayerAddItem(cid, coin.from, ITEMCOUNT_MAX)
		doSendAnimatedText(fromPosition, "$$$", coins[coin.from].effect)
	end
 
	return true
end
 
Code:
[07/08/2011 17:17:45] Lua Script Error: [Test Interface] 
[07/08/2011 17:17:45] data/actions/scripts/other/changegold.lua
[07/08/2011 17:17:45] data/actions/scripts/other/changegold.lua:13: table index is nil
[07/08/2011 17:17:45] stack traceback:
[07/08/2011 17:17:45] 	[C]: in function '__newindex'
[07/08/2011 17:17:45] 	data/actions/scripts/other/changegold.lua:13: in main chunk
[07/08/2011 17:17:45] Warning: [Event::checkScript] Can not load script. /scripts/other/changegold.lua


[07/08/2011 17:17:45] Lua Script Error: [Test Interface] 
[07/08/2011 17:17:45] data/actions/scripts/other/changegold.lua
[07/08/2011 17:17:45] data/actions/scripts/other/changegold.lua:13: table index is nil
[07/08/2011 17:17:45] stack traceback:
[07/08/2011 17:17:45] 	[C]: in function '__newindex'
[07/08/2011 17:17:45] 	data/actions/scripts/other/changegold.lua:13: in main chunk
[07/08/2011 17:17:45] Warning: [Event::checkScript] Can not load script. /scripts/other/changegold.lua


[07/08/2011 17:17:45] Lua Script Error: [Test Interface] 
[07/08/2011 17:17:45] data/actions/scripts/other/changegold.lua
[07/08/2011 17:17:45] data/actions/scripts/other/changegold.lua:13: table index is nil
[07/08/2011 17:17:45] stack traceback:
[07/08/2011 17:17:45] 	[C]: in function '__newindex'
[07/08/2011 17:17:46] 	data/actions/scripts/other/changegold.lua:13: in main chunk
[07/08/2011 17:17:46] Warning: [Event::checkScript] Can not load script. /scripts/other/changegold.lua
 
Back
Top