mIRC Home    About    Download    Register    News    Help

Print Thread
#255212 30/09/15 06:13 AM
Joined: Sep 2015
Posts: 1
H
Mostly harmless
OP Offline
Mostly harmless
H
Joined: Sep 2015
Posts: 1
Hey guys, I keep getting ADD.PTS: unkown command with this code. every other thing is working, including the timer. It doesn't know what to do when the 5 minutes is up concerning adding points to my Points.ini

Quote:
alias -1 addPoints {
if ($1 !isnum) { echo 2 -st $1 is not a number. It need to be a number. | halt }
var %topic $+($chan,.,$nick)
var %points $calc($readini(Points.ini,%topic,Points) + $1)
writeini -n Points.ini %topic Points %points
return %points
}
alias -1 lookUpPoints {
var %topic $+($chan,.,$nick)
var %points $readini(Points.ini,%topic,Points)
return %points
}
alias doaddpoint {
if ($3 !isnum) { echo 2 -st $3 is not a number. It needs to be a number. | halt }
var %topic $+($1,.,$2)
var %points $calc(readini(Points.ini,%topic,Points) + $3)
writeini -n Points.ini %topic Points %points
echo -a Added points for %topic
}
alias dorempoints {
var %topic $+($1,.,$2)
remini -n Points.ini $topic Points
echo -a Removed points for %topic
}
on *:text:!points:#:{
if ((%floodpoints) || ($($+(%,floodpoints.,$nick),2))) { return }
set -u10 %floodpoints On
set -u30 %floodpoints. $+ $nick On
msg # $nick has $readini(Points.ini,$+(#,.,$nick),Points) total Tentacles.
}
on $*:text:/!points (add|remove)/Si:#:{
if ($nick isop #) {
if ($0 < 3) { msg # Insufficient parameters: Use !points <add|remove> <user> [number] | return }
writeini -n Points.ini $+(#,.,$3) Points $calc($readini(Points.ini,$+(#,.,$3),Points) $iif($2 == add,+,-) $iif($4 isnum,$4,1))
{ msg $chan $3 now has $readini(Points.ini,$+(#,.,$3),Points) total Tentacles. }
else { msg $chan This command is only available to moderators. }
}
}
on !*:join:#:{
$+(.timerpoints.,#,.,$nick) 0 300 add.pts $+(#,.,$nick)
add.pts $+(#,.,$nick)
if ((%floodjoin) || ($($+(%,floodjoin.,$nick),2))) { return }
set -u10 %floodjoin On
set -u30 %floodjoin. $+ $nick On
msg $chan $nick has joined and is now earning Tentacles.
}
on !*:part:#:$+(.timerpoints.,#,.,$nick) off
alias -1 add.pts {
writeini -n Points.ini $1 Points $calc($readini(Points.ini,$1,Points) + 1)
if ((%floodpart) || ($($+(%,floodpart.,$nick),2))) { return }
set -u10 %floodpart On
set -u30 %floodpart. $+ $nick On
msg $chan $nick has left the channel and is no longer earning Tentacles.
}


Thanks so much. I know it's a lot to look through, so any help is so very much appreciated.

Joined: Jan 2004
Posts: 1,361
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Jan 2004
Posts: 1,361
There's no add.pts alias in your code.

Joined: Dec 2013
Posts: 779
N
Hoopy frood
Offline
Hoopy frood
N
Joined: Dec 2013
Posts: 779
As loki pointed out, mIRC does not recognize the alias add.pts due to a syntax error.
Since you obviously copied this code from youtube or something, you're probably going to need a lot more knowledge in the language before you attempt to create your own bot. I suggest reading the help files before trying on any of the advanced features of the language.

The answer to your situation however is to change
Code:
alias -1 add.pts {
;to
alias add.pts { 


Nillens @ irc.twitch.tv
Nillen @ irc.rizon.net

Link Copied to Clipboard