Bug Fix Help

Started by Shovon^, Aug 27, 2016, 03:53 AM

Previous topic - Next topic

Shovon^

:-\ I created a script and its almost going to finish but my problem is everything(messages and error syntaxes)appears in the text box doubled and I don't know from where I can fix it and I don't show any code here as becoz I don't know where is the bug from..... :-\ .
Iam the best and i only believe in Allah

Conatact me here on IRC:  #shovon^ @LUnet

.

I understood nothing.
.

Shovon^

OK in simple words:::while chatting or any thing appearing in the text box comes two times/same msg 2 times.......that s the problem...
Iam the best and i only believe in Allah

Conatact me here on IRC:  #shovon^ @LUnet

.

So... are we supposed to guess what's wrong now?
.

Shovon^

I don't tell only to u.....so if anyone knows how to fix it plz tell
Iam the best and i only believe in Allah

Conatact me here on IRC:  #shovon^ @LUnet

Anik

Quote from: Shovon^ on Aug 27, 2016, 04:44 AMI don't tell only to u.....so if anyone knows how to fix it plz tell
How can we help you if you don't show us any code lol.
As per your words I am guessing that you have done 2 things on onPlayerChat. I think you did Message( or any other function to send message ) to send the message of the player to the server and also used return 1.

Kewun

give us screenshot of your onplayerchat function

Shovon^

here:
function onPlayerChat( player, text )
{
EchoMessage( ICOL_LBLUE + "[" + player.ID + "]" + player.Name + ":" + ICOL_BLACK + " " + text + " " );
if ( text=="afk" || text=="brb")
{
if ( Stats[ player.ID ].Logged == false ) MessagePlayer( "[#00FF00][Error] [#FF4500]-[#FFFF00] Whether you're logged in", player );
else if ( Stats[ player.ID ].Reg == false ) MessagePlayer( "[#00FF00][Error] [#FF4500]-[#FFFF00] You are not registered", player );
else if ( !player.IsSpawned ) MessagePlayer(" [#FFFFFF][[#FF0000]Error[#FFFFFF]] [#FF0000] You need to spawn .", player );
else{

if(Stats[ player.ID ].playerAFK== false){

QuerySQL( Registros, "INSERT INTO AFK ( Nombre , POSAFKX , POSAFKY , POSAFKZ , ANGLEAFK  ) VALUES ( '"+player.Name+"', '"+player.Pos.x+"', '"+player.Pos.y+"', '"+player.Pos.z+"', '"+player.Angle+"' )" );
EchoMessage( ICOL_LBLUE + ""+player.Name+": now returns " );
Message(""+GetTeamTocolor(player.Team)+""+player.Name+"[#00FF00]: now returns.");
Stats[ player.ID ].playerAFK= true;
player.Pos = Vector( 474.23223, -1717.48022, 62.5);
player.Angle=90;
player.IsFrozen = true;
}
Iam the best and i only believe in Allah

Conatact me here on IRC:  #shovon^ @LUnet

Kewun

Remove the EchoMessage, i think.

Shovon^

Iam the best and i only believe in Allah

Conatact me here on IRC:  #shovon^ @LUnet

KAKAN

Show us your EchoMessage function too :)
oh no

Shovon^

#11
Cant find the Echomessage function....
This???:
function EMessagePlayer(player, type, ...)
{
vargv.insert(0, this);
switch (type)
{
case Msgtype.Info:
MessagePlayer(InfoMessage(format.acall(vargv)), player);
break;
case Msgtype.Command:
MessagePlayer(CommandMessage(format.acall(vargv)), player);
break;
case Msgtype.Error:
MessagePlayer(ErrorMessage(format.acall(vargv)), player);
break;
}
return 1;
}
Iam the best and i only believe in Allah

Conatact me here on IRC:  #shovon^ @LUnet

EK.IceFlake

EchoMessage = send to IRC

EK.IceFlake

Why do you have an EMessagePlayer function when I dont even see you using it -.-

Shovon^

R u talking about the M-Echo.nut file ???
Iam the best and i only believe in Allah

Conatact me here on IRC:  #shovon^ @LUnet