[10/08/12 16:48:30] [debug] Server crashed while executing BSL2.amx [10/08/12 16:48:30] [debug] Backtrace: [10/08/12 16:48:30] [debug] #0 native SendClientMessage () from bsl [10/08/12 16:48:30] [debug] #1 000ff214 in public ProxDetector (Float:radi=30.00000, playerid=9, string[]=@0x0008b018 "Easy_Job trocou a r", col1=-1029514497, col2=-1029514497, col3=-1029514497, col4=-1029514497, col5=-1029514497) at C:\BSL\BSL 2.1\gamemodes\BSL2.pwn:8473 [10/08/12 16:48:30] [debug] #2 00094098 in public QdoResponderDialogNikoRadio (playerid=9, dialogid=88, response=1, listitem=95, inputtext[]=@0x0095af50 "") at Radio_System.pwn:84 [10/08/12 16:48:30] [debug] #3 00329794 in public S@@_OnDialogResponse (playerid=9, dialogid=88, response=1, listitem=95, inputtext[]=@0x0095af50 "", ... <1 variable argument>) at C:\BSL\BSL 2.1\gamemodes\BSL2.pwn:42901 [10/08/12 16:48:30] [debug] #4 native CallLocalFunction () from bsl [10/08/12 16:48:30] [debug] #5 0001b730 in public OnDialogResponse (playerid=9, dialogid=88, response=1, listitem=95, inputtext[]=@0x0095aea0 "") at C:\sampserver\pawno\include\YSI\internal\y_dohooks .inc:3349 |
public ProxDetector(Float:radi, playerid, string[],col1,col2,col3,col4,col5)
{
if(IsPlayerConnected(playerid) && GetPlayerState(playerid) != PLAYER_STATE_SPECTATING)
{
new Float:posx, Float:posy, Float:posz;
new Float:oldposx, Float:oldposy, Float:oldposz;
new Float:tempposx, Float:tempposy, Float:tempposz;
GetPlayerPos(playerid, oldposx, oldposy, oldposz);
//radi = 2.0; //Trigger Radius
foreach(Player, i)
if(GetPlayerInterior(playerid) == GetPlayerInterior(i))
if(!BigEar[i])
{
GetPlayerPos(i, posx, posy, posz);
tempposx = (oldposx -posx);
tempposy = (oldposy -posy);
tempposz = (oldposz -posz);
if(((tempposx < floatdiv(radi,16)) && (tempposx > -floatdiv(radi,16))) && ((tempposy < floatdiv(radi,16)) && (tempposy > -floatdiv(radi,16))) && ((tempposz < floatdiv(radi,16)) && (tempposz > -floatdiv(radi,16))))
{
SendClientMessage(i, col1, string); // <- this line makes the crash
}
else if(((tempposx < floatdiv(radi,8)) && (tempposx > -floatdiv(radi,8))) && ((tempposy < floatdiv(radi,8)) && (tempposy > -floatdiv(radi,8))) && ((tempposz < floatdiv(radi,8)) && (tempposz > -floatdiv(radi,8))))
{
SendClientMessage(i, col2, string);
}
else if(((tempposx < floatdiv(radi,4)) && (tempposx > -floatdiv(radi,4))) && ((tempposy < floatdiv(radi,4)) && (tempposy > -floatdiv(radi,4))) && ((tempposz < floatdiv(radi,4)) && (tempposz > -floatdiv(radi,4))))
{
SendClientMessage(i, col3, string);
}
else if(((tempposx < floatdiv(radi,2)) && (tempposx > -floatdiv(radi,2))) && ((tempposy < floatdiv(radi,2)) && (tempposy > -floatdiv(radi,2))) && ((tempposz < floatdiv(radi,2)) && (tempposz > -floatdiv(radi,2))))
{
SendClientMessage(i, col4, string);
}
else if(((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
{
SendClientMessage(i, col5, string);
}
}
else
{
SendClientMessage(i, col1, string);
}
}
return 1;
}
format(thestring, sizeof(thestring), "%s trocou a rбdio do veнculo para a %s", Player[playerid][pName], DOF2_GetString(arquivo,endereco));
ProxDetector(30.0, playerid, thestring, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
public ProxDetector(Float:radi, playerid, string[],col1,col2,col3,col4,col5)
{
if(IsPlayerConnected(playerid) && GetPlayerState(playerid) != PLAYER_STATE_SPECTATING)
{
new Float:posx, Float:posy, Float:posz;
new Float:oldposx, Float:oldposy, Float:oldposz;
new Float:tempposx, Float:tempposy, Float:tempposz;
new result[128];format(result, 128, "%s", string);
GetPlayerPos(playerid, oldposx, oldposy, oldposz);
//radi = 2.0; //Trigger Radius
foreach(Player, i)
if(GetPlayerInterior(playerid) == GetPlayerInterior(i))
if(!BigEar[i])
{
GetPlayerPos(i, posx, posy, posz);
tempposx = (oldposx -posx);
tempposy = (oldposy -posy);
tempposz = (oldposz -posz);
if(((tempposx < floatdiv(radi,16)) && (tempposx > -floatdiv(radi,16))) && ((tempposy < floatdiv(radi,16)) && (tempposy > -floatdiv(radi,16))) && ((tempposz < floatdiv(radi,16)) && (tempposz > -floatdiv(radi,16))))
{
SendClientMessage(i, col1, result); // <- this line makes the crash
}
else if(((tempposx < floatdiv(radi,8)) && (tempposx > -floatdiv(radi,8))) && ((tempposy < floatdiv(radi,8)) && (tempposy > -floatdiv(radi,8))) && ((tempposz < floatdiv(radi,8)) && (tempposz > -floatdiv(radi,8))))
{
SendClientMessage(i, col2, result);
}
else if(((tempposx < floatdiv(radi,4)) && (tempposx > -floatdiv(radi,4))) && ((tempposy < floatdiv(radi,4)) && (tempposy > -floatdiv(radi,4))) && ((tempposz < floatdiv(radi,4)) && (tempposz > -floatdiv(radi,4))))
{
SendClientMessage(i, col3, result);
}
else if(((tempposx < floatdiv(radi,2)) && (tempposx > -floatdiv(radi,2))) && ((tempposy < floatdiv(radi,2)) && (tempposy > -floatdiv(radi,2))) && ((tempposz < floatdiv(radi,2)) && (tempposz > -floatdiv(radi,2))))
{
SendClientMessage(i, col4, result);
}
else if(((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
{
SendClientMessage(i, col5, result);
}
}
else
{
SendClientMessage(i, col1, result);
}
}
return 1;
}
Yet another godfather edit, why am I not surprised? If the code size message comes up when compiling your GM then that may be the cause.
|
Try
pawn Code:
|
You should know, doesn't matter if it is a godfather edit or anything else, the samp native should work the same way
Btw I didn't understand what u meant |
I mean this:
If that comes up and you didn't compile with the -v flag (like I did to demonstrate) then your server may randomly crash at undetermined points in code. |