Vice City: Multiplayer

Server Development => Scripting and Server Management => Topic started by: Shovon^ on Aug 27, 2016, 03:53 AM

Title: Bug Fix Help
Post by: Shovon^ on Aug 27, 2016, 03:53 AM
:-\ 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..... :-\ .
Title: Re: Bug Fix Help
Post by: . on Aug 27, 2016, 03:54 AM
I understood nothing.
Title: Re: Bug Fix Help
Post by: Shovon^ on Aug 27, 2016, 03:57 AM
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...
Title: Re: Bug Fix Help
Post by: . on Aug 27, 2016, 04:08 AM
So... are we supposed to guess what's wrong now?
Title: Re: Bug Fix Help
Post by: Shovon^ on Aug 27, 2016, 04:44 AM
I don't tell only to u.....so if anyone knows how to fix it plz tell
Title: Re: Bug Fix Help
Post by: Anik on Aug 27, 2016, 05:22 AM
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.
Title: Re: Bug Fix Help
Post by: Kewun on Aug 27, 2016, 05:43 AM
give us screenshot of your onplayerchat function
Title: Re: Bug Fix Help
Post by: Shovon^ on Aug 27, 2016, 06:55 AM
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;
}
Title: Re: Bug Fix Help
Post by: Kewun on Aug 27, 2016, 06:56 AM
Remove the EchoMessage, i think.
Title: Re: Bug Fix Help
Post by: Shovon^ on Aug 27, 2016, 07:13 AM
ok i will try it
 :)
Title: Re: Bug Fix Help
Post by: KAKAN on Aug 27, 2016, 07:16 AM
Show us your EchoMessage function too :)
Title: Re: Bug Fix Help
Post by: Shovon^ on Aug 27, 2016, 07:23 AM
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;
}
Title: Re: Bug Fix Help
Post by: EK.IceFlake on Aug 27, 2016, 07:35 AM
EchoMessage = send to IRC
Title: Re: Bug Fix Help
Post by: EK.IceFlake on Aug 27, 2016, 07:36 AM
Why do you have an EMessagePlayer function when I dont even see you using it -.-
Title: Re: Bug Fix Help
Post by: Shovon^ on Aug 27, 2016, 08:19 AM
R u talking about the M-Echo.nut file ???
Title: Re: Bug Fix Help
Post by: KAKAN on Aug 27, 2016, 08:37 AM
Quote from: Shovon^ on Aug 27, 2016, 08:19 AMR u talking about the M-Echo.nut file ???
yes. try finding the function in all of your scripts.
Title: Re: Bug Fix Help
Post by: Kewun on Aug 27, 2016, 09:45 AM
Which account system you use?
Title: Re: Bug Fix Help
Post by: Anik on Aug 27, 2016, 10:06 AM
How are you sending message to game with EchoMessage lol......
Title: Re: Bug Fix Help
Post by: Shovon^ on Aug 27, 2016, 10:15 AM
i dont know i forgot......but i dint figure out how to fix it
 :o
Title: Re: Bug Fix Help
Post by: Cool on Aug 27, 2016, 10:00 PM
Quote from: Shovon^ on Aug 27, 2016, 10:15 AMi dont know i forgot......but i dint figure out how to fix it
 :o
Fool post the echo message function not Emessage
:/
Title: Re: Bug Fix Help
Post by: Shovon^ on Aug 28, 2016, 08:54 AM
Fixed and thnx for suggestion