| 11-09-2007, 04:43 PM | #1 |
Alright, i've been working on something I call the 'Risk Engine'. It's GUI based for now, and i've been running into some crazy bugs, so I have a couple questions on gui loops and stuff. It would be greatly appreciated if someone would help me out here, I would really like to fix this bug. I've created 3 global integer variables, and I used those in place of (For Each Integer A).
If anyone has read this far, thanks for paying this much attention to it. I can't post the actual code because it is far too long/complex. |
| 11-09-2007, 07:06 PM | #2 |
you forgot Code:
local integer array udg_a local integer array udg_b local integer array udg_c Also making loops within loops are ok. The global if changed would effect the current loop (depending if you have waits) -Av3n |
| 11-09-2007, 07:23 PM | #3 |
They are not arrays... [a], not a[]. |
| 11-10-2007, 06:01 PM | #4 |
perhaps it is because you are doing this... local integer udg_a = 0 local means local variable udg means user defined global set udg_a = 0 ? |
| 11-10-2007, 06:33 PM | #5 |
| 11-10-2007, 07:07 PM | #6 | |
Quote:
Legend gots the idea. Just use "set udg_a = 0". To answer your questions: I know nothing of trigger excution, I actually wanna find out something similar. But for loops, as long as you don't put wait in or something, and as long as you don't have the same loop running at the same or within the same loop then your okay with them. loop b - 1 loop b - 1 code... this would cause problems |
| 11-10-2007, 11:52 PM | #7 | ||
Quote:
Quote:
This seems to be causing confusion, sorry about that, i've solved the problem since though. One extra line of code... 3 hours of searching for one extra line of code. ![]() |
| 11-11-2007, 12:13 AM | #8 |
@mrapples "Heard of ghost variables?" nope, care to give a simple explaination? @cohadar "Trigger tags are your friends:" How about you make some pseudo code tags? [pseudo] ftw [/pseudo] |
| 11-11-2007, 12:56 AM | #9 | |
Quote:
[code=Pseudo Code]Code Here[/code] |
| 11-11-2007, 03:32 AM | #10 |
>nope, care to give a simple explaination? Woops, ghost variables are using locals in GUI. Code:
Custom Script: local integer udg_integervariable If you put that at the top of a GUI trigger, the 'integervariable' variable would now be local. I know i've seen people use it, but it caused my system to crash. |
