Looking for an expert
#1

Ok,this is a serious problem.
I have a heavily edited GF,as you know,in GF only people near you can see what you typed.But I have a problem.After like an hour or two of playing certain people start talking like in LVDM,everybody sees what they type and also their color.
Any suggestions? Why is this happening?
Thanks in advance
Reply
#2

Upload your OnPlayerText code on pastebin and give us the link.
Reply
#3

If this happens after a while, some of your code 'destroys' the mainthread of pawn-execution. This happens usually if you are writing to an array, and exceed the size, in a custom thread (for instance OnPlayerWhatever).

- Draco
Reply
#4

Ok,this is the end of my code,the one with the chat.

Quote:

if (realchat)
{
if(gPlayerLogged[playerid] == 0)
{
return 0;
}
if(!strcmp(text, "lol", true))
{
GetPlayerName(playerid, sendername, 24);
format(string, 256, "%s laughs out loud.", sendername);
ProxDetector(20.0, playerid, string, 0xC2A2DAAA, 0xC2A2DAAA, 0xC2A2DAAA, 0xC2A2DAAA, 0xC2A2DAAA);
return 0;
}
if(!strcmp(text, "Don", true))
{
GetPlayerName(playerid, sendername, 24);
format(string, 256, "%s says : Don Rullez !! ", sendername);
ProxDetector(20.0, playerid, string, 0xC2A2DAAA, 0xC2A2DAAA, 0xC2A2DAAA, 0xC2A2DAAA, 0xC2A2DAAA);
return 0;
}
if(!strcmp(text, "omg", true))
{
GetPlayerName(playerid, sendername, 24);
format(string, 256, "%s gasps, 'Oh My God!'", sendername);
ProxDetector(20.0, playerid, string, 0xC2A2DAAA, 0xC2A2DAAA, 0xC2A2DAAA, 0xC2A2DAAA, 0xC2A2DAAA);
return 0;
}
if(!strcmp(text, "omfg", true))
{
GetPlayerName(playerid, sendername, 24);
format(string, 256, "%s gasps, 'Oh My Fucking God!'", sendername);
ProxDetector(20.0, playerid, string, 0xC2A2DAAA, 0xC2A2DAAA, 0xC2A2DAAA, 0xC2A2DAAA, 0xC2A2DAAA);
return 0;
}
if(!strcmp(text, "ty", true))
{
GetPlayerName(playerid, sendername, 24);
format(string, 256, "%s says, 'Thanks!'", sendername);
ProxDetector(20.0, playerid, string, 0xC2A2DAAA, 0xC2A2DAAA, 0xC2A2DAAA, 0xC2A2DAAA, 0xC2A2DAAA);
return 0;
}
if(!strcmp(text, "sry", true))
{
GetPlayerName(playerid, sendername, 24);
format(string, 256, "%s gasps, 'I'm so sorry!'", sendername);
ProxDetector(20.0, playerid, string, 0xC2A2DAAA, 0xC2A2DAAA, 0xC2A2DAAA, 0xC2A2DAAA, 0xC2A2DAAA);
return 0;
}
if(!strcmp(text, "wtf", true))
{
GetPlayerName(playerid, sendername, 24);
format(string, 256, "%s shouts, 'What the fuck?!'", sendername);
ProxDetector(20.0, playerid, string, 0xC2A2DAAA, 0xC2A2DAAA, 0xC2A2DAAA, 0xC2A2DAAA, 0xC2A2DAAA);
return 0;
}
if(!strcmp(text, "stfu", true))
{
GetPlayerName(playerid, sendername, 24);
format(string, 256, "%s shouts, 'Shut the fuck up!'", sendername);
ProxDetector(20.0, playerid, string, 0xC2A2DAAA, 0xC2A2DAAA, 0xC2A2DAAA, 0xC2A2DAAA, 0xC2A2DAAA);
return 0;
}
if(!strcmp(text, "w.e", true))
{
GetPlayerName(playerid, sendername, 24);
format(string, 256, "%s mumbles, 'Whatever'", sendername);
ProxDetector(20.0, playerid, string, 0xC2A2DAAA, 0xC2A2DAAA, 0xC2A2DAAA, 0xC2A2DAAA, 0xC2A2DAAA);
return 0;
}
if(!strcmp(text, "w/e", true))
{
GetPlayerName(playerid, sendername, 24);
format(string, 256, "%s mumbles, 'Whatever'", sendername);
ProxDetector(20.0, playerid, string, 0xC2A2DAAA, 0xC2A2DAAA, 0xC2A2DAAA, 0xC2A2DAAA, 0xC2A2DAAA);
return 0;
}
if(!strcmp(text, "lmao", true))
{
GetPlayerName(playerid, sendername, 24);
format(string, 256, "%s laughs their ass off!", sendername);
ProxDetector(20.0, playerid, string, 0xC2A2DAAA, 0xC2A2DAAA, 0xC2A2DAAA, 0xC2A2DAAA, 0xC2A2DAAA);
return 0;
}
if(!strcmp(text, "rofl", true))
{
GetPlayerName(playerid, sendername, 24);
format(string, 256, "%s rolls around on the ground, laughing hysterically!", sendername);
ProxDetector(20.0, playerid, string, 0xC2A2DAAA, 0xC2A2DAAA, 0xC2A2DAAA, 0xC2A2DAAA, 0xC2A2DAAA);
return 0;
}
if(!strcmp(text, "haha", true))
{
GetPlayerName(playerid, sendername, 24);
format(string, 256, "%s laughs out loud.", sendername);
ProxDetector(20.0, playerid, string, 0xC2A2DAAA, 0xC2A2DAAA, 0xC2A2DAAA, 0xC2A2DAAA, 0xC2A2DAAA);
return 0;
}
if(!strcmp(text, "afk", true))
{
GetPlayerName(playerid, sendername, 24);
format(string, 256, "%s is now Away From Keyboard.", sendername);
ProxDetector(20.0, playerid, string, 0xC2A2DAAA, 0xC2A2DAAA, 0xC2A2DAAA, 0xC2A2DAAA, 0xC2A2DAAA);
return 0;
}
if(!strcmp(text, "lmfao", true))
{
GetPlayerName(playerid, sendername, 24);
format(string, 256, "%s laughs their fucking ass off!", sendername);
ProxDetector(20.0, playerid, string, 0xC2A2DAAA, 0xC2A2DAAA, 0xC2A2DAAA, 0xC2A2DAAA, 0xC2A2DAAA);
return 0;
}
if(!strcmp(text, "brb", true))
{
GetPlayerName(playerid, sendername, 24);
format(string, 256, "%s will be right back.", sendername);
ProxDetector(20.0, playerid, string, 0xC2A2DAAA, 0xC2A2DAAA, 0xC2A2DAAA, 0xC2A2DAAA, 0xC2A2DAAA);
return 0;
}
if(!strcmp(text, "back", true))
{
GetPlayerName(playerid, sendername, 24);
format(string, 256, "%s is now Back To Keyboard.", sendername);
ProxDetector(20.0, playerid, string, 0xC2A2DAAA, 0xC2A2DAAA, 0xC2A2DAAA, 0xC2A2DAAA, 0xC2A2DAAA);
return 0;
}
if(!strcmp(text, "gg", true))
{
GetPlayerName(playerid, sendername, 24);
format(string, 256, "%s shouts : Good Game !", sendername);
ProxDetector(20.0, playerid, string, 0xC2A2DAAA, 0xC2A2DAAA, 0xC2A2DAAA, 0xC2A2DAAA, 0xC2A2DAAA);
return 0;
}
if(!strcmp(text, "gj", true))
{
GetPlayerName(playerid, sendername, 24);
format(string, 256, "%s shouts : Good Job !", sendername);
ProxDetector(20.0, playerid, string, 0xC2A2DAAA, 0xC2A2DAAA, 0xC2A2DAAA, 0xC2A2DAAA, 0xC2A2DAAA);
return 0;
}
if(NameOff[playerid] == 1)
{
GetPlayerName(playerid, plName[playerid], 26);
format(string, sizeof(string), "Unknown Says: %s", text);
ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_F ADE4,COLOR_FADE5);
return 0;
}
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "%s Says: %s", sendername, text);
ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_F ADE4,COLOR_FADE5);
return 0;
}

I would also like to add.This bug usually appears if the player doesn't see the welcome message.Like you know,every server has a welcomke message like "Welcome to...Type /login" or whatever,If the player doesn't see it he/she usualy has the bug.
Same for the Nameoff=1,if the player doesn't see the welcome message and has nameoff=1 the bug will appear

Thanks in advance
Reply
#5

So? anybody?
Reply
#6

I guess your heap/stack size exeeded.

Compile your script with -d2 as parameter for pawncc, too look how much it is. If it exceeds, you can try to increase your dynamic memory size (#pragma dynamic 400000 at the beginner of your script, default is 8000, though).

- Draco
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)