Jump to content

DeadlySilence

Members
  • Posts

    181
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by DeadlySilence

  1. Hello, today I wanted to make a function which returns all IDs of equipped items. The function looks like this: function script getEquip { // get all equipped item IDs .@idx = 0; for (set .@i, 1; .@i < 11; set .@i, .@i + 1) { if (-1 != getequipid(.@i)) { setarray .@items[.@idx], getequipid(.@i); set .@idx, .@idx + 1; } } return .@items; } It's all fine and .@items contains all neccessary IDs. But when I call the function like this: .@a = callfunc("getEquip"); .@a contains only a scalar value (the ID of the first item, I guess), instead of the array with all the IDs. Could someone please tell me how to porperly return an array?
×
×
  • Create New...