mIRC Home    About    Download    Register    News    Help

Print Thread
#160615 28/09/06 10:24 PM
Joined: Aug 2006
Posts: 44
X
Xtibian Offline OP
Ameglian cow
OP Offline
Ameglian cow
X
Joined: Aug 2006
Posts: 44
:| 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


Newbie Scripter. Learning pretty fast...lol :P
#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.
  }
}
 


If you have a plastic floor runner over your tiles, then you're one Hella Pinoy!
#160617 28/09/06 10:37 PM
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
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".


Invision Support
#Invision on irc.irchighway.net
#160618 28/09/06 11:14 PM
Joined: Aug 2006
Posts: 44
X
Xtibian Offline OP
Ameglian cow
OP Offline
Ameglian cow
X
Joined: Aug 2006
Posts: 44
:| I seem to always forget ')'

Cant use 's' in ini?

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


Newbie Scripter. Learning pretty fast...lol :P
#160619 29/09/06 04:47 PM
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
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.


Invision Support
#Invision on irc.irchighway.net
#160620 30/09/06 03:30 AM
Joined: Aug 2006
Posts: 44
X
Xtibian Offline OP
Ameglian cow
OP Offline
Ameglian cow
X
Joined: Aug 2006
Posts: 44
Okay, But still cant figuire out why the scripts don't work properly. :|


Newbie Scripter. Learning pretty fast...lol :P
#160621 30/09/06 03:33 AM
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
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.


Invision Support
#Invision on irc.irchighway.net
#160622 01/10/06 09:45 PM
Joined: Aug 2006
Posts: 44
X
Xtibian Offline OP
Ameglian cow
OP Offline
Ameglian cow
X
Joined: Aug 2006
Posts: 44
Yes, I did that. But still nothing.


Newbie Scripter. Learning pretty fast...lol :P

Link Copied to Clipboard