mIRC Home    About    Download    Register    News    Help

Print Thread
#184247 26/08/07 09:00 PM
Joined: May 2004
Posts: 49
G
GalaxeY Offline OP
Ameglian cow
OP Offline
Ameglian cow
G
Joined: May 2004
Posts: 49
Code:
alias tellversion { return say I'm using mIRC $version $+ , running roflfunny Script v $rofl-version $+ . }

alias rofl-version {
  .writeini config.ini mirc version 0.1beta
  $readini(config.ini,mirc,version)
}


I get this message:
0.1BETA is a unknown command


Signature:
I'm boring, ain't I? Oh well...:|
GalaxeY #184248 26/08/07 09:03 PM
Joined: Jan 2006
Posts: 111
N
Vogon poet
Offline
Vogon poet
N
Joined: Jan 2006
Posts: 111
Use:

Quote:

return $readini(config.ini,mirc,version)

GalaxeY #184249 26/08/07 09:07 PM
Joined: Dec 2002
Posts: 2,962
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 2,962
Code:
alias rofl-version {
  .writeini config.ini mirc version 0.1beta
  return $readini(config.ini,n,mirc,version)
}


You forgot to return the value!

Note: I also added the n parameter to $readini(). This prevents mIRC from trying to evaluate the contents of the line it is returning. It's unlikely to affect this particular peice of code but it's a good thing to remember in general.


Spelling mistakes, grammatical errors, and stupid comments are intentional.

Link Copied to Clipboard