Reply
Thread Tools Display Modes
Unread 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
Billi is offline   Reply With Quote
Unread 05-09-05, 09:33 AM   #2
Gello
A Scalebane Royal Guard
AddOn Author - Click to view addons
Join Date: Jan 2005
Posts: 435
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.
Gello is online now   Reply With Quote
Unread 05-09-05, 03:49 PM   #3
Billi
A Defias Bandit
Join Date: May 2005
Posts: 3
Thx a lot

was a great help
Billi is offline   Reply With Quote
Reply

Go BackWoWInterface » 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