Wat!

Loops in Neat Script

I recently implemented a bunch of new features in Neat Script and Console. Among these features are expression evaluation and conditions. These features make it possible to create loops in Neat Script files. here’s an example of a loop in Neat Script:

echo off 
echo Testing loop 
dv l 1 
:loop 
   echo (l)*(l)=((l)*(l)) 
   inc l 
if ((l)<=10) goto loop 
echo Done! 
echo on 
end

neatloop

So basically this is how you can create loops in Neat Script:

Create a batch file using Notepad or any other text editor
Define labels with a colon before their name (i.e. :label), these will be your loop’s start point
Use goto command to jump to a label
Run your script using call command.
You can control your loops by creating console variables (dvars) and using conditions (if and on commands).

Go ahead and download Neat Game Engine now!

Sam Afshari's Notes December 10, 2010

Rejoining the server...

Rejoin failed... trying again in seconds.

Failed to rejoin.
Please retry or reload the page.

The session has been paused by the server.

Failed to resume the session.
Please retry or reload the page.

An unhandled error has occurred. Reload 🗙