Thread: Level: None
View Single Post
  #4  
Unread 11-26-2010, 09:59 AM
EQAditu's Avatar
EQAditu EQAditu is offline
A Griffon
Interface Author - Click to view interfaces
 
Join Date: Mar 2005
Server: Permafrost
Posts: 256
Default

You're making a mistake of thinking that the script interpreter reads separated commands left to right. It reads things from right to left(so that expressions are evaluated before going into a variable) and then from the top line to the bottom.

Example 1:
var=1
var=2
var=3
var=4

Result is that var == 4

Example 2:
var=1 var=2 var=3 var=4
Result is that var == 1

Example 3:
var=1
var=2
var=3
var=4
Result is that var == 4

Example 3 works as a single line because "
" are XML entities for "\r\n". (A carriage return and a new line)
Reply With Quote