View Single Post
04-07-13, 07:37 AM   #14
Resike
A Pyroguard Emberseer
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 1,290
Originally Posted by F16Gaming View Post
On a slightly unrelated note, the following:


Can be simplified to:
Code:
if PS_EnableAddon and PS_SoundEffect then
There's no need to have a separate if-clause for every boolean, and booleans can be tested without "== true".
Yeah, i know i just recently edited that line, thats why the double if, but if i dont put == true, then it gonna run even if it has different values like "icecream" or "lolwhatever", and i only want it to run when its really true.

Code:
if something then
    --
end
Is equivalent with :


Code:
if something ~= nil and something ~= false then
    --
end

Last edited by Resike : 04-07-13 at 09:43 AM.
  Reply With Quote