[Solved] checkflags script problem

Paste Your code(s) here, and state your problem.

[Solved] checkflags script problem

Postby fraguk » Thu Dec 29, 2011 6:23 pm

can some 1 fix this script plz

Code: Select all
alias -1 inifile { return file.ini }
alias -1 developmentchannel { return #teh-evilcode }
alias -1 totalstrike { return 3 }
alias -1 excludechannels { return #fraguk }
alias -1 interval { return 600 }

on *:CONNECT: checktimer

alias checktimer {
  .timer.checkflag 1 $interval checktimer
  .remini $inifile flags
  .msg Q whoami
}


alias checkflags {
  var %x = $comchan($me,0)
  while (%x) {
    var %c = $comchan($me,%x)
    if (!$readini($inifile,react,%c)) { .writeini -n $inifile react %c 0 }
    if (!$istok($excludechannels,%c,32)) {
      if (!$readini($inifile,flags,%c)) {
        var %r = $readini($inifile,react,%c)
        var %s = $calc(%r + 1)
        .writeini -n $inifile react %c %s
        .msg $developmentchannel Channel %c Strike %s out of $totalstrike
        .msg %c Strike %s out of $totalstrike

      }
      if ($readini($inifile,react,%c) == $totalstrike) {
        .msg $developmentchannel Channel: %c Strike out $totalstrik
        .msg %c Channel %c Strike %s Strike out $totalstrike
        .msg %c Channel %c parting no flags on Q
        .remini $inifile react

        if ($me ison %c) {
                
            .part %c
        }
      }
    }
    dec %x
  }
}

on *:NOTICE:*:?: {
  if ($nick == Q) {
    if ($left($1,1) == $chr(35)) {
      .writeini -n $inifile flags $1 $2
    }
    if (*End of list* iswm $1-) {
      checkflags
    }
  }
}


error from the bots status window--

* /timer: timer .checkflag not active
-
* /remini: invalid parameters (line 11, checkflags.mrc)
-
fraguk
 

Re: checkflags script problem

Postby Cristian » Thu Dec 29, 2011 8:27 pm

I tried loading the script, and found a very strange error.

The -l was replaced with -1
Code: Select all
alias -1 inifile { return file.ini }


the -l in alias -l <alias name> does so only the script can use the alias, so -l means local.

so please replace -1 with -l at the aliases.
Cristian
proof of advance
proof of advance
 
Posts: 282
Joined: Sun Nov 04, 2007 3:02 pm
Location: Denmark
Authnick: Sumsar

Re: checkflags script problem

Postby fraguk » Thu Dec 29, 2011 9:38 pm

All done, but i still get the same error from the bot..

* /timer: timer .checkflag not active
-
* /remini: invalid parameters (line 11, checkflags.mrc)
-

line 11 = .remini $inifile flags
fraguk
 

Re: checkflags script problem

Postby Cristian » Thu Dec 29, 2011 10:23 pm

I doesn't with me, just in case I tried it again.

Delete this from the script.
Code: Select all
alias -1 inifile { return file.ini }
alias -1 developmentchannel { return #teh-evilcode }
alias -1 totalstrike { return 3 }
alias -1 excludechannels { return #fraguk }
alias -1 interval { return 600 }


And put this in, instead.
Code: Select all
alias -l inifile { return file.ini }
alias -l developmentchannel { return #teh-evilcode }
alias -l totalstrike { return 3 }
alias -l excludechannels { return #fraguk }
alias -l interval { return 600 }


And it should work again.
Cristian
proof of advance
proof of advance
 
Posts: 282
Joined: Sun Nov 04, 2007 3:02 pm
Location: Denmark
Authnick: Sumsar

Re: checkflags script problem

Postby fraguk » Fri Dec 30, 2011 12:02 am

thanks, that fix works Cristian :)
fraguk
 


Return to Mirc Scripting Help

Who is online

Users browsing this forum: No registered users and 1 guest

cron