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

co jest nie tak?

legolas23

New Member
Joined
Jan 8, 2009
Messages
537
Reaction score
3
Mógłby ktoś zerknąć na ten skrypt i błąd z konsoli i powiedzieć mi co jest nie tak? ;p
Code:
function onUse(cid, item, frompos, item2, topos)
local ruina = 9299
if (itemEx.uid == 23241) then
if 70 >= math.random(1,100) then
doPlayerSendTextMessage(cid,22,"Udalo ci sie czesciowo rozbic sciane")
doTransformItemEx(uid,ruina)
doSendMagicEffect(getPlayerPosition,4)
else
doPlayerSendTextMessage(cid,22,"Nieudalo ci sie rozbic sciany")
end
end
return TRUE
end

Blad
Code:
Lua Script Error: [Action Interface]
data/actions/scripts/mlotek1.lua:onUse

data/actions/scripts/mlotek1.lua:3: attempt to index global 'itemEx' (a nil valu
e)
stack traceback:
        data/actions/scripts/mlotek1.lua:3: in function <data/actions/scripts/ml
otek1.lua:1>
 
Last edited:
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
	local ruina = 9299
	if (itemEx.uid == 23241) then
		if math.random(1, 100) <= 70 then
			doPlayerSendTextMessage(cid, 22, "Udalo ci sie czesciowo rozbic sciane")
			doTransformItemEx(item.uid, ruina)
			doSendMagicEffect(getCreaturePosition(cid), 4)
		else
			doPlayerSendTextMessage(cid, 22, "Nieudalo ci sie rozbic sciany")
		end
	end
	return TRUE
end
 
Last edited:
Nadal nie działa. Wkleiłem w pierwszym poście treść błędu z konsoli.
 
Zmien header na:
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
 
Back
Top