Thread Tools Display Modes
05-09-05, 05:55 AM   #1
Billi
A Defias Bandit
Join Date: May 2005
Posts: 3
Script Dokumentation

Can you help me plz

I wanna fix some bugs but i need a Documentation of the Script Language WoW is using.

I would prefer a universal answer.... but for now ist would help to know which is the correct form of :

if temp != NULL then .......

or

if temp <> nil then

or something like that...


Thx a lot


Billi
Billi is online now Edit/Delete Message
  Reply With Quote
05-09-05, 09:33 AM   #2
Gello
A Molten Giant
AddOn Author - Click to view addons
Join Date: Jan 2005
Posts: 521
Reference for Lua: http://www.lua.org/manual/5.0/ (Anything to do with file input/output and almost all os commands are disabled/inactive.)

correct form of that would be:
if temp ~= nil then
-- do stuff
end


or
if temp then
-- do stuff
end


In Lua, 0 is not nil. This took some getting used to for me. The above will be true for all of these: temp=true, temp=1, temp="a string", temp=0, temp={}, temp="".

The only cases when it wouldn't be true is: temp=false, temp=nil (meaning temp is not defined yet.)

Last edited by Gello : 05-09-05 at 09:37 AM.
  Reply With Quote
05-09-05, 03:49 PM   #3
Billi
A Defias Bandit
Join Date: May 2005
Posts: 3
Thx a lot

was a great help
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Script Dokumentation

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off