#Why does `Entities.GetItemInSlot( hero_index, slot_index )` return Undefined?

1 messages · Page 1 of 1 (latest)

rugged prairie
#

idk if you deleted your msg to retract this question or what, but there is no GetItemInSlot method on Entities

#

its an npc function.

#

oh, just occurred to me that you mean the panorama function.
it should only return undefined if there is nothing in that slot

median crag
#

No worries. I figured it out. The problem was that I used toString( int ), which js returned as undefined. int.toString() worked fine. Still learning little things about js XD

dry breach
#

Is there even a toString(int)?

median crag
#

No, the native function is Object.toString(). Js natively returns undefined if you toString(Object). I goofed there because I was used to Lua's interchangeability in that regard.