Differences

This shows you the differences between the selected revision and the current
version of the page.


wmebook:ch2 2008/07/21 19:46 wmebook:ch2 2008/07/21 19:47 current
Line 451: Line 451:
Everything should be very clear at this point. If it’s not, please review the previous chapters before you can understand what’s going on. The only important thing is that we passed to **if** command, instead of our good old direct comparison, a //function//, which returns true or false. **if** command evaluates the function (which in this case returns //false//) and then executes the //else// block. Everything should be very clear at this point. If it’s not, please review the previous chapters before you can understand what’s going on. The only important thing is that we passed to **if** command, instead of our good old direct comparison, a //function//, which returns true or false. **if** command evaluates the function (which in this case returns //false//) and then executes the //else// block.
 +
====== 2.5. Includes ====== ====== 2.5. Includes ======
Line 464: Line 465:
**Important:** **Important:**
Never initialize your variables in the include files. They will get reinitialized with every inclusion of your script. Never initialize your variables in the include files. They will get reinitialized with every inclusion of your script.
- 
-<code script> 
-for (var a=0; a<10;a=a+1) Game.Msg("Hell"); 
-Game.Msg("1"); 
-for (a=0; a<10;a=a+1) Game.Msg("Hell"); // note that I had to put the var away as it was already declared before. 
-Game.Msg("2"); 
-for (a=0; a<10;a=a+1) Game.Msg("Hell"); // note that I had to put the var away as it was already declared before. 
-Game.Msg("3"); 
-</code> 
 
wmebook/ch2.1216662363.txt.gz · Last modified: 2008/07/21 19:46 by metamorphium
Recent changes RSS feed Creative Commons License Driven by DokuWiki