what's wrong with my coding here? containedItems()
Posted: Tue Jul 16, 2013 8:38 pm
Here's the example code that's still throwing off the nil value error message:
but it's still saying "attempt to call method 'containedItems' (a nil value)" and stops looking for more items after that
It's been a while since I did any lua, so it's probably something obvious I've forgotten.
Code: Select all
for i in entitiesAt(party.level,party.x,party.y) do
if i:containedItems()~=nil then
for j in i:containedItems() do
print(j.name)
end
end
endIt's been a while since I did any lua, so it's probably something obvious I've forgotten.