• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Hashtables issue

Status
Not open for further replies.
Level 10
Joined
Feb 22, 2008
Messages
619
Have you tried adding a wait function (out of the loops) in between removing the items from the bag and putting the new items in?
You could also remove "If Bagslot Equal to 1" from the trigger, and use 'For each (Integer A)' for both the top and bottom


If BagSlot == 0
Then
For each (Integer A) from 1 to 6, do (Actions)
Hashtable Save Handle Of (Item Carried by (Casting unit) in slot (Integer A) as 0 of (Integer A) in HashItem(0)
Else
For each (Integer A) from 1 to 6, do (Actions)
Hashtable Save Handle Of (Item Carried by (Casting unit) in slot (Integer A) as 0 of (Integer A) in HashItem(1)

For each (Integer A) from 1 to 6, do (Actions)
Item - Remove [(Item carried by Casting unit in slot (Integer A)]

Wait 0.1

If BagSlot == 0
Then
For each (Integer A) from 1 to 6, do (Actions)
Hero - Create (Item-type of (Load 0 of (Integer A) in HashItem(0)) and give it to (Casting unit)
Else
For each (Integer A) from 1 to 6, do (Actions)
Hero - Create (Item-type of (Load 0 of (Integer A) in HashItem(1)) and give it to (Casting unit)
 
Level 2
Joined
Aug 20, 2015
Messages
18
No that's not it, I found what it is and it was dumb, what I did, each time the loop is happening an item is removed from slot 1 and is just being created again in slot 6 times so it just gets removed again. Pretty dumb that I posted it here.
 
Status
Not open for further replies.
Top