mIRC Homepage
Posted By: Xtibian :\ Help here - 28/09/06 10:24 PM
:| 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
Posted By: xDaeMoN Re: :\ Help here - 28/09/06 10:34 PM
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.
  }
}
 
Posted By: Riamus2 Re: :\ Help here - 28/09/06 10:37 PM
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".
Posted By: Xtibian Re: :\ Help here - 28/09/06 11:14 PM
:| I seem to always forget ')'

Cant use 's' in ini?

Also, I dont understand why it says elseif either. It just showed that.
Posted By: Riamus2 Re: :\ Help here - 29/09/06 04:47 PM
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.
Posted By: Xtibian Re: :\ Help here - 30/09/06 03:30 AM
Okay, But still cant figuire out why the scripts don't work properly. :|
Posted By: Riamus2 Re: :\ Help here - 30/09/06 03:33 AM
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.
Posted By: Xtibian Re: :\ Help here - 01/10/06 09:45 PM
Yes, I did that. But still nothing.
© mIRC Discussion Forums