mIRC Home    About    Download    Register    News    Help

Print Thread
#160615 28/09/06 10:24 PM
X
Xtibian
Xtibian
X
:| Well, These worked fine. But now they dont. lol I feel kinda stupid but help me out here. :| One problem is when I do it I get 2 amsg's one for admin and one for owner. Also, doesn't work with me anymore and works for anyone but me. o.O

Code:
on *:TEXT:!global *:#:{
  if ( %flood.var ) halt  
if ($readini(botadmin.ini,s,Owner) {
amsg [GLOBAL][BotOwner $nick $+ ] $2-
floodcheck $cid $nick
}
}  
* /elseif: invalid format (line 3, ownerglobal.mrc)

Code:
  on *:TEXT:!global *:#:{
  if ( %flood.var ) halt   if ($readini(botadmin.ini,s,Global) {
amsg [GLOBAL][BotAdmin $nick $+ ] $2-
}
else {
notice $nick Only Bot Admins may use the !global command.
floodcheck $cid $nick
}
}


If you can make the srcipt better Id love that as well. lol

#160616 28/09/06 10:34 PM
Joined: Mar 2005
Posts: 420
X
Fjord artisan
Offline
Fjord artisan
X
Joined: Mar 2005
Posts: 420
Code:
 on *:TEXT:!global *:#:{
  if ( %flood.var ) halt  
  floodcheck $cid $nick
  if ($readini(botadmin.ini,s,Global4)[color:red])[/color] {
    amsg [GLOBAL][BotAdmin $nick $+ ] $2-
  }
  else {
    notice $nick Only Bot Admins may use the !global command.
  }
}
 

#160617 28/09/06 10:37 PM
Joined: Oct 2004
Posts: 8,061
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Oct 2004
Posts: 8,061
Is there a section called "s" in the ini? $readini(botadmin.ini,s,Owner)

And, you're missing )'s at the end of each of those $readini's.

Also, your errors says "elseif" .... nothing you are showing includes an "elseif".

#160618 28/09/06 11:14 PM
X
Xtibian
Xtibian
X
:| I seem to always forget ')'

Cant use 's' in ini?

Also, I dont understand why it says elseif either. It just showed that.

#160619 29/09/06 04:47 PM
Joined: Oct 2004
Posts: 8,061
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Oct 2004
Posts: 8,061
You can't search ini with $readini ... I'm assuming that's what you were doing with the "s", the way you would with $read.

INIs are set up to avoid the need to search... you just need to know the category and item names.

As a note, you can $read an INI file, but it kind of makes using an INI file pointless as it isn't anything more than a TXT file if you're just using $read.

#160620 30/09/06 03:30 AM
X
Xtibian
Xtibian
X
Okay, But still cant figuire out why the scripts don't work properly. :|

#160621 30/09/06 03:33 AM
Joined: Oct 2004
Posts: 8,061
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Oct 2004
Posts: 8,061
Well, you need to fix the missing )'s and change the $readini so it's not trying to search, since searching isn't part of $readini.

#160622 01/10/06 09:45 PM
X
Xtibian
Xtibian
X
Yes, I did that. But still nothing.


Link Copied to Clipboard