• 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 Whats wrong with this?

Santi

Theres no way im stopping
Joined
Aug 29, 2010
Messages
1,975
Reaction score
152
Location
00
This is an addon statue, when you click it you should get the citizen addons full.
I made this script myself, thats why its probably wrong (begginer at LUA scripting)

Lua:
local addon = 1
local storage = 50000
function onUse(cid, item, frompos, item2, topos)
	if getPlayerStorageValue(cid, storage) == -1 then
		doPlayerAddOutfit(cid,addon,3)
		setPlayerStorageValue(storage, 1)
	else
		doPlayerSendCancel(cid,"You already have this addon!")
	end
return true
end

22:13 You see a statue of Fafnar.
ItemID: [10355], UniqueID: [46789].
XML:
<action uniqueid="46789" event="script" value="addon statue.lua"/>

Error:
Code:
[09/11/2010 22:10:34] [Error - Action Interface] 
[09/11/2010 22:10:34] data/actions/scripts/addon statue.lua:onUse
[09/11/2010 22:10:34] Description: 
[09/11/2010 22:10:34] (luaDoCreatureSetStorage) Creature not found

So, I just want to know how to fix the script, and know if theres something wrong.
Thanks in advance and rep+. Using TFS 0.3.6
 
Thanks! I luv ya serv.
You must spread some Reputation around before giving it to SpiderOt again.
Ill give ya later :).
 
Back
Top