Difference between revisions of "End"

From WikiManual
Jump to: navigation, search
(Flow Commands)
 
(3 intermediate revisions by 3 users not shown)
Line 5: Line 5:
 
End is now added in automatically to all text files that do not contain it.  Which means you don't ''have'' to include it in your DNA files anymore.  Backwards compatibility is maintained still, and loading in a DNA file with an end in it will work just as well as the same DNA file without the end.
 
End is now added in automatically to all text files that do not contain it.  Which means you don't ''have'' to include it in your DNA files anymore.  Backwards compatibility is maintained still, and loading in a DNA file with an end in it will work just as well as the same DNA file without the end.
  
=== Flow Commands===
+
example:
* [[cond]]
 
* [[start]]
 
* [[else]]
 
* [[stop]]
 
* [[end]]
 
  
* [[Robot DNA]]
+
'''cond'''
 +
*.eye5 50 >
 +
'''start'''
 +
-1 .shoot store
 +
'''stop'''
 +
'''end'''
 +
 
 +
{{Flow Commands}}

Latest revision as of 10:20, 1 July 2014

Pre-2.4

End is the most important of all commands, even if it was only written once. "end" tells the program when to stop reading in a DNA file. If there is no end, the program will likely read in residual numbers from RAM and interpret them as DNA. Often, other bot's DNA that is still in memory will be read in until its end is found. Many, many errors are caused by the lack of a proper end statement.

Post-2.4

End is now added in automatically to all text files that do not contain it. Which means you don't have to include it in your DNA files anymore. Backwards compatibility is maintained still, and loading in a DNA file with an end in it will work just as well as the same DNA file without the end.

example:

cond
*.eye5 50 >
start
-1 .shoot store
stop
end

Flow Commands:

cond
start else
stop
end