SA-MP Forums Archive
Command making my server crash - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Command making my server crash (/showthread.php?tid=67231)



Command making my server crash - Coicatak - 27.02.2009

This command make my server crash, any idea why?
pawn Код:
if(strcmp(cmd, "/installalarm", true) == 0)
    {
      if(IsPlayerConnected(playerid))
      {
        if(gAlarmKit[playerid] == 0) return SendClientMessage(playerid, COLOR_GREY, "Vous n'avez pas de kit alarme");
        new car = GetPlayerVehicleID(playerid);
        if(!IsPlayerInAnyVehicle(playerid) || (TmpCarKeys[playerid] != car && TmpCarKeys2[playerid] != car))
            {
              SendClientMessage(playerid, COLOR_GREY, "Vous n'кtes pas dans votre vйhicule");
              return 1;
            }
            GetPlayerName(playerid, sendername, sizeof(sendername));
            UnderscoreToSpace( sendername );
            format(string, sizeof(string), "%s installe une alarme sur son vйhicule");
            if(car == TmpCarKeys[playerid])
            {
                ProxDetector(30, playerid, string, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
                SendClientMessage(playerid, COLOR_WHITE, "Alarme installйe.");
                CarInfo[car][cAlarm] = gAlarmKit[playerid];
                printf("alarm");
                return 1;
            }
            else if(car == TmpCarKeys2[playerid])
            {
                ProxDetector(30, playerid, string, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
                SendClientMessage(playerid, COLOR_WHITE, "Alarme installйe.");
                CarInfo[car][cAlarm] = gAlarmKit[playerid];
                printf("alarm");
                return 1;
            }
            SaveSQLCar(car,TmpCarID[car]);
            printf("savesqlcar");
        }
        return 1;
    }
This can help
pawn Код:
public SaveSQLCar(idx, idx2)
{
    new sql[128];
    format(sql, sizeof(sql), "UPDATE cars2 SET color1=%d,color2=%d,alarm=%d,insurances=%d, tracker=%d WHERE id=%d",
    CarInfo[idx][cColor1],
    CarInfo[idx][cColor2],
    CarInfo[idx][cAlarm],
    CarInfo[idx][cInsurances],
    CarInfo[idx][cTracker],
    idx2 );
    samp_mysql_query(sql);
    return 1;
}
Thanks in advance


Re: Command making my server crash - brett7 - 27.02.2009

is this command in a filterscript or gamemode?


Re: Command making my server crash - Coicatak - 27.02.2009

GM.

Edit: OMG, even several commands which worked perfectly yesterday are now fucked up and make my server crash ! Any help please? This is urgent


Re: Command making my server crash - FUNExtreme - 27.02.2009

Did you add a new FS to your server before it started?


Re: Command making my server crash - Coicatak - 28.02.2009

Yes, a map editor, oed.amx


Re: Command making my server crash - darkrider366 - 28.02.2009

Quote:
Originally Posted by Coicatak
Yes, a map editor, oed.amx
remove it, and it should work
or, try removing anything else u added since the problems started


Re: Command making my server crash - Coicatak - 04.03.2009

Quote:
Originally Posted by darkrider366
Quote:
Originally Posted by Coicatak
Yes, a map editor, oed.amx
remove it, and it should work
or, try removing anything else u added since the problems started
I withdrawn the FS but some commands which have never caused problems still do...
Do you have an idea why?

Help please, this is really urgent, my server crashes every days