Lua - Control Statement

2011. 2. 23. 15:59Programming/Etc.

Ref : http://www.lua.org/manual/5.1/


* Compare

if (left < right) then
 elseif (left == right) then
 else
 end


* Loop

for i = 1, 10, 1 do
  
end


* Loop for array

for item in expression do
  
end


* Function definition

function foo()
  
end


* Print message

print("Hello world!")


** Wow Register

this:RegisterEvent("PLAYER_TARGET_CHANGED")