Code: Select all
// Yarr, eternal loop ahead!
var thing := 0;
while (thing == 0)
var thing := 1; // Notice the var.
print(thing); // Output: 1
endwhile
print(thing); // Output: 0
EScript Compiler's version is 1.08.
Code: Select all
// Yarr, eternal loop ahead!
var thing := 0;
while (thing == 0)
var thing := 1; // Notice the var.
print(thing); // Output: 1
endwhile
print(thing); // Output: 0
Code: Select all
DisplayWarnings 1
Code: Select all
var thing := 0;
program textcmd_thingy()
while ( thing == 0 )
var thing := 1;
print(thing);
endwhile
print(thing);
endprogramCode: Select all
program TextCMD(mobile)
var x := 1;
while ( x <= 1 )
var y := 2;
x += 1;
y += 1;
endwhile
print(y); // You'll get the error here,
endprogram
Code: Select all
program use_item(who, item)
while (who.connected)
var item := Target(who);
// Do stuff with targeted item
endwhile
// Do stuff with used item.
return 1;
endprogram