Variable with null? - 30/07/15 09:51 PM
I'm new to mSL and I've been having difficulties finding documentation/resources outside of the wiki, I am trying to check if a variable is returning something or not but it's not working
It will always say the welcome message even though there are coins on the account, before I had it set to || instead of && and it would always give the return message despite the variable being null, I'm pretty confused at this point.
Code:
alias lookupDD { var %topic $+($1,.,$2) var %dongcoins $readini(dongcoins.ini,%topic,dongcoins) return %dongcoins }
Code:
on !*:join:#:{ var %result = $lookupDD($chan, $nick) /* check if user has joined before */ add.pts $+(#,.,$nick) if ((%result != "") && (%result != $null) && (%result != null) && !%result) { msg $chan $nick has returned and is now earning DD(Dong Dollars). } else { msg # Welcome, $nick This seems to be your first time joining us live, Make sure to hit that follow button and help defeat some Dong creations } }
It will always say the welcome message even though there are coins on the account, before I had it set to || instead of && and it would always give the return message despite the variable being null, I'm pretty confused at this point.