This is an example of the for-loop bug found in patch 2.0.10.
- 2 comments
- 2 comments
Facts
- Date created
- Aug 07, 2013
- Category
- Last update
- Aug 07, 2013
- Development stage
- Release
- Language
- enUS
- License
- Public Domain
- Downloads
- 142
- Recent file
- R: Example Map Aug 07, 2013
- Reply
- #2
TheDestroyer01 Aug 16, 2013 at 05:13 UTC - 0 likesThis is the code:
auto2218957F_ae = 5;
auto2218957F_ai = 1;
lv_x = 1;
for ( ; ( (auto2218957F_ai >= 0 && lv_x <= auto2218957F_ae) || (auto2218957F_ai <= 0 && lv_x >= auto2218957F_ae) ) ; lv_x += auto2218957F_ai ) {
UIDisplayMessage(PlayerGroupAll(), c_messageAreaSubtitle, (StringExternal("Param/Value/7DE97036") + IntToText(lv_x)));
}
UIDisplayMessage(PlayerGroupAll(), c_messageAreaSubtitle, (StringExternal("Param/Value/294008FC") + IntToText(lv_x)));
return true;
and it goes 1 2 3 4 5 6. Completely weird, I would have expected 1 2 3 4 5 5.
Currently Developing Dungeon Explorer
- Reply
- #1
TheUltragon Aug 08, 2013 at 17:48 UTC - 0 likesWell, seems like the variables aren't set back to the previous value anymore after they were checked by the for-loop. And yes, your not crazy :D
Current project:
http://www.sc2mapster.com/forums/resources/project-workplace/84332-rock-the-cabinet-entry-blademaster/#p1