mIRC Home    About    Download    Register    News    Help

Print Thread
#254255 30/07/15 09:51 PM
Joined: Jul 2015
Posts: 4
G
Ginzo Offline OP
Self-satisified door
OP Offline
Self-satisified door
G
Joined: Jul 2015
Posts: 4
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.

Last edited by Ginzo; 30/07/15 09:54 PM.
Joined: Jan 2004
Posts: 1,358
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Jan 2004
Posts: 1,358
There are no inline comments

Joined: Jul 2015
Posts: 4
G
Ginzo Offline OP
Self-satisified door
OP Offline
Self-satisified door
G
Joined: Jul 2015
Posts: 4
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?

Joined: Jul 2006
Posts: 4,144
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,144
Use this wiki wink


#mircscripting @ irc.swiftirc.net == the best mIRC help channel

Link Copied to Clipboard