mIRC Homepage
Posted By: LittleJohnsr On event specific to channel - 02/10/04 05:28 PM
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.
Posted By: KingTomato Re: On event specific to channel - 02/10/04 06:16 PM
just remove the []'s around %ac.
Posted By: LittleJohnsr Re: On event specific to channel - 02/10/04 07:57 PM
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.


© mIRC Discussion Forums