• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Pawn] SA-MP Server crashes
#1
Hello. 
I got low-rp server in georgia. I got 80-150 players every day but i run into this problem everyday for 5-6 times.
My server crashes due this error. 

[20:29:44] [debug] Server crashed while executing new.amx
[20:29:44] [debug] AMX backtrace:
[20:29:44] [debug] #0 00000072 in ?? (105, 99, 111, 100, 101, 32, 109, 97, 105, 110, ... <17 more arguments>) at D:\Genuine Project\pawno\include\float.inc:112
[20:29:44] [debug] #1 00000072 in main () at D:\Genuine Project\pawno\include\float.inc:112



I don't know what to do. Help me, i'm hopeless...

my discord ID: #LevanBedinashvili#3247
  Reply
#2
HELP !!
  Reply
#3
It seems like your server is crashing due to an error related to executing the new.amx script. The backtrace provided indicates that the crash occurred at line 112 in the float.inc file, since the crash seems to be related to the float.inc file, review it to ensure that there are no errors in it. Specifically, check line 112 and the surrounding code for any issues.
  Reply
#4
(2024-03-09, 02:20 AM)N0FeaR Wrote: It seems like your server is crashing due to an error related to executing the new.amx script. The backtrace provided indicates that the crash occurred at line 112 in the float.inc file, since the crash seems to be related to the float.inc file, review it to ensure that there are no errors in it. Specifically, check line 112 and the surrounding code for any issues.


stock Float:operator*(Float:oper1, oper2)
    return floatmul(oper1, float(oper2));

this is code for 112 line. 

can i provide you with some code where i used multiply operator ? maybe you can see something inappropriate which i don't. 

#1 
Convert(number)
{
new hours = 0, mins = 0, secs = 0, string[100];
hours = floatround(number / 3600);
mins = floatround((number / 60) - (hours * 60));
secs = floatround(number - ((hours * 3600) + (mins * 60)));
if(hours > 0) format(string, 100, "%d:%02d:%02d", hours, mins, secs);
else format(string, 100, "%d:%02d", mins, secs);
return string;
}



#2
if(PI[playerid][pSettings][5] == 1 && Satiety_Timer[playerid] == -1)
    {
new st_string[10], Float:st_count = PI[playerid][pSatiety] * 0.78 ;
format(st_string, sizeof(st_string), "%d%", PI[playerid][pSatiety]);
PlayerTextDrawSetString(playerid, Satiety_PTD[playerid][4], st_string);
PlayerTextDrawTextSize(playerid, Satiety_PTD[playerid][0], st_count, 5.0000);
for(new t; t != 14; t++) TextDrawShowForPlayer(playerid, Satiety_TD[t]);
for(new t; t != 6; t++) PlayerTextDrawShow(playerid, Satiety_PTD[playerid][t]);
Satiety_Timer[playerid] = SetTimerEx("SatietyUPDATE", 1000, 1, "i", playerid);
Satiety_Time[playerid] = 10;
}
else if(PI[playerid][pSettings][5] == 1 && Satiety_Timer[playerid] != -1)
{
new st_string[10], Float:st_count = PI[playerid][pSatiety] * 0.78 ;
format(st_string, sizeof(st_string), "%d%", PI[playerid][pSatiety]);
PlayerTextDrawSetString(playerid, Satiety_PTD[playerid][4], st_string);
PlayerTextDrawHide(playerid, Satiety_PTD[playerid][0]);
PlayerTextDrawTextSize(playerid, Satiety_PTD[playerid][0], st_count, 5.0000);
PlayerTextDrawShow(playerid, Satiety_PTD[playerid][0]);
  }


#3

if(PI[playerid][pSettings][5] == 1 && Satiety_Timer[playerid] == -1)
    {
new st_string[10], Float:st_count = PI[playerid][pSatiety] * 0.78 ;
format(st_string, sizeof(st_string), "%d%", PI[playerid][pSatiety]);
PlayerTextDrawSetString(playerid, Satiety_PTD[playerid][4], st_string);
PlayerTextDrawTextSize(playerid, Satiety_PTD[playerid][0], st_count, 5.0000);
for(new t; t != 14; t++) TextDrawShowForPlayer(playerid, Satiety_TD[t]);
for(new t; t != 6; t++) PlayerTextDrawShow(playerid, Satiety_PTD[playerid][t]);
Satiety_Timer[playerid] = SetTimerEx("SatietyUPDATE", 1000, 1, "i", playerid);
Satiety_Time[playerid] = 10;
}
else if(PI[playerid][pSettings][5] == 1 && Satiety_Timer[playerid] != -1)
{
new st_string[10], Float:st_count = PI[playerid][pSatiety] * 0.78 ;
format(st_string, sizeof(st_string), "%d%", PI[playerid][pSatiety]);
PlayerTextDrawSetString(playerid, Satiety_PTD[playerid][4], st_string);
PlayerTextDrawHide(playerid, Satiety_PTD[playerid][0]);
PlayerTextDrawTextSize(playerid, Satiety_PTD[playerid][0], st_count, 5.0000);
PlayerTextDrawShow(playerid, Satiety_PTD[playerid][0]);
  }



#4

selfie system:
GetPlayerPos(playerid, selfi1[playerid][0], selfi1[playerid][1], selfi1[playerid][2]);
    new Float:n1X, Float:n1Y, Float:Selfi1;
    GetPlayerFacingAngle(playerid, Selfi1);
    n1X = selfi1[playerid][0] + selfi3 * floatcos(180.0, degrees);
    n1Y = selfi1[playerid][1] + selfi3 * floatsin(180.0, degrees);
        SetPlayerAttachedObject(playerid, 0, 18868, 6, 0.06, 0.01, 0.08, 180.0, 90.0, 0.0);
    SetPlayerCameraPos(playerid, n1X, n1Y, selfi1[playerid][2] + selfi4);
    SetPlayerCameraLookAt(playerid, selfi1[playerid][0], selfi1[playerid][1], selfi1[playerid][2] + 1);
    SetPlayerFacingAngle(playerid, selfi2[playerid] - 270.0);
    TogglePlayerControllable(playerid, 0);
  Reply
#5
Try this

PHP Code:
// Convert function
Convert(number)
{
    new 
hours 0mins 0secs 0string[100];
    
hours floatround(number 3600);
    
mins floatround((number 60) - (hours 60));
    
secs floatround(number - ((hours 3600) + (mins 60)));
    if (
hours 0
        
format(stringsizeof(string), "%d:%02d:%02d"hoursminssecs);
    else 
        
format(stringsizeof(string), "%d:%02d"minssecs);
    return 
string;
}

// Satiety update logic
if (PI[playerid][pSettings][5] == 1) {
    new 
st_string[10], Float:st_count PI[playerid][pSatiety] * 0.78;
    
format(st_stringsizeof(st_string), "%d%%"PI[playerid][pSatiety]);
    
PlayerTextDrawSetString(playeridSatiety_PTD[playerid][4], st_string);
    
PlayerTextDrawTextSize(playeridSatiety_PTD[playerid][0], st_count5.0);
    for (new 
t!= 14t++) 
        
TextDrawShowForPlayer(playeridSatiety_TD[t]);
    for (new 
t!= 6t++) 
        
PlayerTextDrawShow(playeridSatiety_PTD[playerid][t]);
    if (
Satiety_Timer[playerid] == -1) {
        
Satiety_Timer[playerid] = SetTimerEx("SatietyUPDATE"10001"i"playerid);
        
Satiety_Time[playerid] = 10;
    }
}

// Selfie system
GetPlayerPos(playeridselfi1[playerid][0], selfi1[playerid][1], selfi1[playerid][2]);
new 
Float:n1XFloat:n1YFloat:Selfi1;
GetPlayerFacingAngle(playeridSelfi1);
n1X selfi1[playerid][0] + selfi3 floatcos(180.0degrees);
n1Y selfi1[playerid][1] + selfi3 floatsin(180.0degrees);
SetPlayerAttachedObject(playerid01886860.060.010.08180.090.00.0);
SetPlayerCameraPos(playeridn1Xn1Yselfi1[playerid][2] + selfi4);
SetPlayerCameraLookAt(playeridselfi1[playerid][0], selfi1[playerid][1], selfi1[playerid][2] + 1);
SetPlayerFacingAngle(playeridselfi2[playerid] - 270.0);
TogglePlayerControllable(playerid0); 
  Reply


Forum Jump: