11.08.2012, 07:35
weird? Look backtrace...
my ProxDetector:
when and how it has been called:
anyone has any idea how to fix?
Is it really a bug from sa:mp ?
I'm using centOS, 64bits, dedicated server, samp 0.3e R2
thank you
Quote:
[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 |
PHP Code:
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;
}
PHP Code:
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);
Is it really a bug from sa:mp ?
I'm using centOS, 64bits, dedicated server, samp 0.3e R2
thank you