Don't want to JASS it fully yet

Kershbob

New Member
Reaction score
30
Anyway of doing something like this?

Code:
For each (Integer A) from 1 to 6, do (Actions)
    Loop - Actions
        Custom script: set (item + I2S(GetForLoopIndexA())) = UnitItemInSlotBJ(some_local_unit, GetForLoopIndexA())

I'm really lazy and need to move this items around a lot and do alsorts to them.
 

phyrex1an

Staff Member and irregular helper
Reaction score
447
Code:
set [B](item + I2S(GetForLoopIndexA()))[/B] = UnitItemInSlotBJ(some_local_unit, GetForLoopIndexA())
Are you trying to combine a variable name with a string and get another variable?
You can't to that. I guess you want an array of items insteed.
If the variable is global then you have to prefix it with udg_.
Here is an example with an global array variable of type item named Item.

Code:
set udg_Item[bj_forLoopAIndex] = UnitItemInSlotBJ(some_local_unit, bj_forLoopAIndex)

If you want to remove the BJ function then you can run the loop from 0 to 5 insteed and have this code.

Code:
set udg_Item[bj_forLoopAIndex] = UnitItemInSlot(some_local_unit, bj_forLoopAIndex)
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top