mIRC Home    About    Download    Register    News    Help

Print Thread
On event specific to channel #99550 02/10/04 05:28 PM
Joined: Feb 2004
Posts: 14
L
LittleJohnsr Offline OP
Pikka bird
OP Offline
Pikka bird
L
Joined: Feb 2004
Posts: 14
What I have done is create a sound manager that allows the user to have diffrent sound play for diffrent events on diffrent channels ( sound complex) basicaly so that if someone watching one channel and an even happens on another they are made aware by a sound playing.
My Problem is this The below event will not work when I use echo to see what happening I see that the splay command has the correct settings but the ($readini($scriptdirsettings,[%ac],chop) == on) shows %ac and not the channel.
Here is the Echo Reply: if ($readini($scriptdirsettings,[%ac],chop) == on) /splay C:\RGC4.0\sounds\3hellos.wav


on *:OP:#: {
set %ac $chan
if ($readini($scriptdirsettings,[%ac],chop) == on) { /splay $readini($scriptdirsettings.ini,%ac,opsd) }
else { return }
}

Thanks in advance for anyhelp anyone can provide.

Last edited by LittleJohnsr; 02/10/04 05:30 PM.
Re: On event specific to channel #99551 02/10/04 06:16 PM
Joined: Jan 2003
Posts: 3,012
KingTomato Offline
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2003
Posts: 3,012
just remove the []'s around %ac.


-KingTomato
Re: On event specific to channel #99552 02/10/04 07:57 PM
Joined: Feb 2004
Posts: 14
L
LittleJohnsr Offline OP
Pikka bird
OP Offline
Pikka bird
L
Joined: Feb 2004
Posts: 14
Already tried that I added the [] in an attempt to force mIRC to eval it first. After removing the [] tried it again here is the Echo after nothing happened.

if ($readini($scriptdirsettings,%ac,chop) == on) /splay C:\RGC4.0\sounds\3hellos.wav

as you can see the %ac has not been evlauated to be the channel Name as it should have been.

After going over the Script about a dozen times and trying to work also ( I suggest never scripting and working at the same time) I found the problem the $scripdirsettings should have been $scriptdirsettings.ini

Thanks for your help though. Everyone here is so helpfull makes it nice.