Author Topic: Can someone fix this mute/unmute event server.cs?  (Read 1312 times)

The mute part seems to work, but the unmute doesn't. Please help.

Code: [Select]
function GameConnection::unMute(%this)
{
$Mute[%victim.BL_ID] = false;
MessageClient(%victim, '', "\c6You are now unmuted");
}
It would be %this.BL_ID not %victim.BL_ID because %victim is not defined.

« Last Edit: March 14, 2012, 02:54:46 PM by FFSO »

Code: [Select]
function GameConnection::unMute(%this)
{
        %this.BL_ID = %victim.BL_ID;
$Mute[%victim.BL_ID] = false;
MessageClient(%victim, '', "\c6You are now unmuted");
}
That makes no sense, it would make %this.BL_ID blank because %victim.BL_ID is not defined.

« Last Edit: March 14, 2012, 02:54:40 PM by FFSO »

It will work, you suck at coding if you dont understand it.
why don't you go try it yourself?

%victim is undefined, any attempt to access data from it will not work because it does not exist.

It will work, you suck at coding if you dont understand it.
it won't work, i think you suck at coding for saying other people suck at coding for pointing out your errors
Code: [Select]
function GameConnection::unMute(%this)
{
        %this.BL_ID = %victim.BL_ID;
$Mute[%victim.BL_ID] = false;
MessageClient(%victim, '', "\c6You are now unmuted");
}
it should be
Code: [Select]
function GameConnection::unMute(%this)
{
$Mute[%this.BL_ID] = false;
MessageClient(%this, '', "\c6You are now unmuted");
}
or
Code: [Select]
function GameConnection::unMute(%this, %victum)
{
$Mute[%victim.BL_ID] = false;
MessageClient(%victim, '', "\c6You are now unmuted");
}

it won't work, i think you suck at coding for saying other people suck at coding for pointing out your errors
that
also, you're backwards FFSO
%this.BL_ID = %victim.BL_ID; should be %victim.BL_ID = %this.BL_ID;

It will work, you suck at coding if you dont understand it.
You just made the biggest richard out of yourself.
that
also, you're backwards FFSO
%this.BL_ID = %victim.BL_ID; should be %victim.BL_ID = %this.BL_ID;
No it shouldn't, like already mentioned %victim doesn't exist. Not to mention there is absolutely no reason why you should be setting the bl_id property and it won't even work, it's protected by the engine.

So, I just replace %victim.BL_ID with %this.BL_ID, correct?

So, I just replace %victim.BL_ID with %this.BL_ID, correct?
Only in the un mute part.

It will work, you suck at coding if you dont understand it.
it won't work, i think you suck at coding for saying other people suck at coding for pointing out your errorsit should be
Oh hell naaaaaaw.

You just made the biggest richard out of yourself.No it shouldn't, like already mentioned %victim doesn't exist. Not to mention there is absolutely no reason why you should be setting the bl_id property and it won't even work, it's protected by the engine.
oops
forgot that that defined bl_id on %victim, not %victim.bl_id, those are arrays

Code: [Select]
function GameConnection::unMute(%this)
{
$Mute[%this.BL_ID] = false;
MessageClient(%this, '', "\c6You are now unmuted");
}
obviously replace %victim with %this

Code: [Select]
function GameConnection::unMute(%this)
{
$Mute[%this.BL_ID] = false;
MessageClient(%this, '', "\c6You are now unmuted");
}
obviously replace %victim with %this
Read the entire topic, it's already been solved.