| 02-13-2006, 07:35 PM | #2 |
It looks stupid. Probably GUI has if nesting limit. Try converting it into JASS. |
| 02-14-2006, 06:23 AM | #3 |
wow dude... That gotta be the largest if i have ever seen. And yeah, JASS all the way for stuff like that. |
| 02-14-2006, 09:19 AM | #4 |
Or you could have done it a lot easier by setting a variable array at the beginning and then doing it with a loop. Also, it doesn't do anything if it is >15,000. That correct? |
| 02-14-2006, 09:35 AM | #5 |
Wow. What a waste of time. Don't nest in GUI that deep. |
| 02-14-2006, 12:31 PM | #6 |
Actually if GUI has a nesting limit, most likelly JASS has also. Well You can just not nest stuff instead of Code:
if (...)
....
else
if (...)
...
else
if (...)
....
elseyou can use: Code:
if (...)
{
....
skip remaining actions
}
if (...)
{
....
skip remaining actions
}
if (...)
{
....
skip remaining actions
}
if (...)
{
....
skip remaining actions
}
if (...)
{
....
skip remaining actions
}
|
| 02-14-2006, 08:34 PM | #7 |
I agree with Griffen, use arrays, the setup may be ugly, but in the end it will be better since it doesn't need to go through all those stupid IF statements. |
| 02-14-2006, 10:57 PM | #8 |
Arrays FTW! |
| 02-15-2006, 03:42 AM | #9 | |
Quote:
I think Vexorian's would also work in this. |
| 02-15-2006, 08:54 AM | #10 |
It would work, but it would be lines and lines and lines and lines of code, wheras mine would be 4/5. |
| 02-15-2006, 02:18 PM | #11 |
Arrays = Part of the path of godliness. The only other stuff better than arrays is what blizzard didn't give us. |
| 02-15-2006, 02:32 PM | #12 | |
Quote:
|
| 02-15-2006, 03:15 PM | #13 |
Unless you really need to have these exact vaules you might be able to use some math with modulo and such and calculate the ranking from the points. |
| 02-15-2006, 03:21 PM | #14 |
2D arrays are so easy to implement it isn't even funny :/ |
