Command making my server crash
#1

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
Reply
#2

is this command in a filterscript or gamemode?
Reply
#3

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
Reply
#4

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

Yes, a map editor, oed.amx
Reply
#6

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
Reply
#7

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)