mIRC Homepage
Posted By: Ginzo 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

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.
Posted By: Loki12583 Re: Variable with null? - 30/07/15 10:30 PM
There are no inline comments
Posted By: Ginzo Re: Variable with null? - 30/07/15 10:52 PM
Originally Posted By: Loki12583
There are no inline comments


I feel silly. smile Thank you so much!
I saw it on the wiki here:
https://en.wikipedia.org/wiki/MIRC_scripting_language

so is /* */ not allowed at all or it just can't be on the same line?
Posted By: Wims Re: Variable with null? - 30/07/15 10:57 PM
Use this wiki wink
© mIRC Discussion Forums