I've always been able to use hashtables perfectly fine (GUI), however, I recently ran into a problem.
Basicly this trigger is called (runned) by another trigger (run trigger ignoring conditions), but the results are the same if i put the branch of code in another trigger, which I am SURE runs.
Basicly, nothing happens. The text message you see at the bottom won't be displayed. If i copy the text message and put it at the top, (or write something else) then it will be displayed.
So I ran to the conclusion that one of these causes some kind of skip remaining actions... yeah, idk either.
If I put the text message after the first hashtable action, it still does not show.
HOWEVER, if i put it after one of the set variables, and move the hashtable one to the bottom, it DOES show.
So in the end, its the save integer that F*cks up.
Any sulotion?
Btw, I'm using standard world editor, but tested it with Newgen as well, same problem.
+rep and cookie if solved!
(cookie not garaunteed)
-
growing hashtables
- Events
- Conditions
-
Actions
- Hashtable - Save ((Load (Key growtime) of (Key (Random unit from TempGroup)) from HerbHashtable) - 1) as (Key growtime) of (Key (Random unit from TempGroup)) in HerbHashtable
- Set TempInteger = ((Load (Key growtimemax) of (Key (Random unit from TempGroup)) from HerbHashtable) - (Load (Key growtime) of (Key (Random unit from TempGroup)) from HerbHashtable))
- Set TempInteger2 = ((100 / (Load (Key growtimemax) of (Key (Random unit from TempGroup)) from HerbHashtable)) x TempInteger)
- Set TempInteger = (TempInteger2 + 0)
- Game - Display to (All players) the text: growing hash
Basicly this trigger is called (runned) by another trigger (run trigger ignoring conditions), but the results are the same if i put the branch of code in another trigger, which I am SURE runs.
Basicly, nothing happens. The text message you see at the bottom won't be displayed. If i copy the text message and put it at the top, (or write something else) then it will be displayed.
So I ran to the conclusion that one of these causes some kind of skip remaining actions... yeah, idk either.
If I put the text message after the first hashtable action, it still does not show.
HOWEVER, if i put it after one of the set variables, and move the hashtable one to the bottom, it DOES show.
So in the end, its the save integer that F*cks up.
Any sulotion?
Btw, I'm using standard world editor, but tested it with Newgen as well, same problem.
+rep and cookie if solved!
(cookie not garaunteed)
EDIT:
Yes, there is only one unit in "Tempgroup", if you need to know.
EDIT2:
Hmm... woops. Maybe I should have posted it in "triggers and scripts", could someone move the thread...?
EDIT3:
God, sorry, I've been totally wrong.
I tried to change the trigger abit, trying to make it... smaller:
-
growing hashtables
- Events
- Conditions
-
Actions
- Hashtable - Save ((Load (Key growtime) of (Key (Random unit from TempGroup)) from HerbHashtable) - 1) as (Key growtime) of (Key (Random unit from TempGroup)) in HerbHashtable
- Game - Display to (All players) the text: growing hash set ha...
- Set TempInteger = ((100 / (Load (Key growtimemax) of (Key (Random unit from TempGroup)) from HerbHashtable)) x ((Load (Key growtimemax) of (Key (Random unit from TempGroup)) from HerbHashtable) - (Load (Key growtime) of (Key (Random unit from TempGroup)) from HerbHashtable)))
- Game - Display to (All players) the text: growing hash set var
IT IS NOT THE SAVE INTEGER, IT IS THE SET VARIABLE
growing hash set hash: displays
growing hash set var: does not
Basicly the set variable here causes the trigger to skip its remaining actions.
Setting a simple value like "2" doesent skip the rest, and as far as I know, all the TempIntegers in the other triggers works fine.
And for some reason, TempInteger always returns "1".
Probably doesent set at all, and the "1" is from another trigger using TempInteger, that ran earlier.
Probably refering to my player number somehow... "1". I use TempInteger alot.
Last edited: