command crashes server
#1

I don't know what is wrong with this code but this is crashing the server

pawn Код:
if(strcmp(x_v,"buyinsurance",true) == 0)
        {
            new carkey = playerinfo[playerid][vkey];
            if(IsPlayerInVehicle(playerid, carkey))
            {
                vehicleinfo[carkey][Insurances] = (vehicleinfo[carkey][Insurances] +1);
                vehicleinfo[carkey][InsurancePrice] = (vehicleinfo[carkey][InsurancePrice] +500);
                format(query, sizeof(query),"UPDATE vehicles SET Insurances=%d,InsurancePrice=%d WHERE carid=%d",
                vehicleinfo[currentplayervehicle[playerid]][Insurances],vehicleinfo[currentplayervehicle[playerid]][InsurancePrice],currentplayervehicle[playerid]);
                mysql_query(query);
                new xstring[120];
                format(xstring, sizeof(xstring),"%s you bought a new insurance for your vehicle.",playerinfo[playerid][Name]);
                SendClientMessage(playerid, COLOR_GREEN, string);
            }
       
        }
Reply


Messages In This Thread
command crashes server - by Hornet600 - 29.03.2011, 18:28
Re : command crashes server - by Vukilore - 29.03.2011, 18:46
Re: Re : command crashes server - by WillyP - 29.03.2011, 18:47
Re : command crashes server - by Vukilore - 29.03.2011, 18:48
Re: command crashes server - by Jochemd - 29.03.2011, 18:49
Re: Re : command crashes server - by WillyP - 29.03.2011, 18:49
Re: command crashes server - by Hornet600 - 29.03.2011, 19:23

Forum Jump:


Users browsing this thread: 1 Guest(s)