| 01-13-2007, 11:51 PM | #2 |
You are not using GUI loops, so your "reads (String((Integer A))) at Loc" should be the experience giving. EDIT: Like make "integer = random int between X and X", then give the hero exp integer, and display integer. |
| 01-14-2007, 12:15 AM | #4 |
k thanks man |
| 01-14-2007, 02:16 AM | #5 |
Pyrogasm, does that actually work? Your custom script part says "local Integer XP". 1: Isn't it "integer" (JASS = case sensitive)? 2: Isn't it udg_varname? |
| 01-14-2007, 02:20 AM | #6 |
= ) yep. i just finished setting my trigger's, it works 100% |
| 01-14-2007, 02:21 AM | #7 |
Am I retarted? I thought maybe I did something wrong... integer should not be capitalized. Also, it does need the "udg_". I don't know why I didn't put it in! D'oh! I've fixed the above trigger... |
| 01-14-2007, 03:15 AM | #8 |
is there something im missing about the variable or something? i've got the trigger right but when i kill them, the proper numbers show up but i dont actually get the exp |
| 01-14-2007, 03:40 AM | #9 |
The custom on the first line of actions in Pyro's is completely unnecesary. GUI cant read locals well, and you have a global there anyway, so no reason to use a local |
| 01-14-2007, 03:59 AM | #10 | |
Quote:
Which FYI, works perfectly. Remember, GUI is nothing but jass in disguise. Therefore everything that works in one can work in the other. |
| 01-14-2007, 06:06 AM | #11 | |
Quote:
Did you try the UPDATED version? I've correct Pyrogasm's mistakes and it should work now (I think). |
| 01-15-2007, 05:53 AM | #12 |
I used the local because it makes the trigger more reliable. When using a global for this, there is a very small chance (but a chance none-the-less) that the integers will get messed up. Using a local avoids that possibility, and with a local integer, you don't even need to nullify it! |
| 01-17-2007, 08:57 PM | #13 |
i see.. ok cool. |
| 01-17-2007, 11:36 PM | #14 | |
Quote:
That is not the case. As long as you have no waits in between when you assign and use the variable, your variable will not be changed. Try it, if you don't believe me. Also, about the local-global trick, it only works for one global variable. After that, there are wierd problems that occur. But in this case, no local is required. |
| 01-17-2007, 11:56 PM | #15 |
I know that it only works once per trigger, and that they can't be used in conditions. By "very small chance" I meant if the events occurred at the same time (which is VERY unlikely), in which case the XP could become 'confused' and get weirded out. It's just smarter to use a local... why would they exist if we shouldn't use them? Ammorth has made a valid point, however, and if you keep getting errors, you can leave the local part out. |
