• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Pawn] SA-MP Server crashes
#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


Messages In This Thread
SA-MP Server crashes - by LevanBedinashvili - 2024-03-08, 05:29 PM
RE: SA-MP Server crashes - by LevanBedinashvili - 2024-03-08, 06:48 PM
RE: SA-MP Server crashes - by N0FeaR - 2024-03-09, 02:20 AM
RE: SA-MP Server crashes - by LevanBedinashvili - 2024-03-09, 02:08 PM
RE: SA-MP Server crashes - by N0FeaR - 2024-03-09, 07:46 PM

Forum Jump: