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

Lua Weird notrash error

Powtreeman

Member
Joined
Sep 26, 2011
Messages
400
Reaction score
6
Location
USA
I get this error in 1.0

notrash error.png

I have these in movements
Code:
<movevent event="AddItem" tileitem="1" itemid="1387" script="others/notrash.lua"/>
     <movevent event="AddItem" tileitem="1" itemid="5023" script="others/notrash.lua"/>
     <movevent event="AddItem" tileitem="1" itemid="5024" script="others/notrash.lua"/>
One of them is the portal in the demon oak spawn.
 
Last edited:
We'll need the notrash.lua to help you.

Probably, it was something like
Code:
local config{
ID = 9999
}......

onAddItemblabla
...
if id == 9999 then (...) -- it should be "if config.ID == 9999"

I mean, it must be an incorrect local.
 
Code:
function onAddItem(moveitem, tileitem, position)
   if (tileitem.actionid > 0 or tileitem.uniqueid > 0) then
     doRemoveItem(moveitem.uid)
     doSendMagicEffect(position, CONST_ME_POFF)
   end
   return true
end
 
Does it happens where it should work?

That's a weird script o.O
Anyway.. I'm not familiar with 1.0
But I think you should use tileitem.uid
I'm not sure if it is causing the error.. but try it.
Code:
function onAddItem(moveitem, tileitem, position)
if (tileitem.actionid > 0 or tileitem.uid > 0) then
doRemoveItem(moveitem.uid)
doSendMagicEffect(position, CONST_ME_POFF)
end
return true
end
 
Does it happens where it should work?

That's a weird script o_O
Anyway.. I'm not familiar with 1.0
But I think you should use tileitem.uid
I'm not sure if it is causing the error.. but try it.
Code:
function onAddItem(moveitem, tileitem, position)
if (tileitem.actionid > 0 or tileitem.uid > 0) then
doRemoveItem(moveitem.uid)
doSendMagicEffect(position, CONST_ME_POFF)
end
return true
end
 
Man... This script removes those items (Ids: 1387 5023 5024) when you move then to ANY item/tile with ANY aid or uid... That doesn't make any sense to me, but what ever.
Code:
function onAddItem(moveitem, tileitem, position)
  if tileitem.actionid > 0 or tileitem.uid > 0 then
    if tileitem.itemid == 1387 then
        return false
    else
    doRemoveItem(moveitem.uid)
    doSendMagicEffect(position, CONST_ME_POFF)
  end
  return true
end
 
Back
Top