House doesn't save
#4

PHP код:
forward SaveHouseCallback(houseidplayerid);
public 
SaveHouseCallback(houseidplayerid)
{
    new
        
rows;
    if(
rows == 1)
    {
        
//SendClientMessage(SavingVehiclePlayerID, RED, "This Vehicle already exists");
        
SendClientMessage(playeridRED"This House already exists!");
    }
    else if(
rows == 0)
    {
        new 
query[2000];
         
format(querysizeof(query), "INSERT INTO `Houses` (`hInteriorID`, `hInteriorX`, `hInteriorY`, `hInteriorZ`, `hInteriorA`, `hExteriorID`, `hExteriorX`, `hExteriorY`, `hExteriorZ`, `hExteriorA`, `hSpawnID`, ");
        
format(querysizeof(query), "%s`hSpawnX`, `hSpawnY`, `hSpawnZ`, `hSpawnA`, `hOwner`, `hAddress`, `HousePrice`, `hLockStatus`, `hType`) VALUES "query);
        
format(querysizeof(query), "%s(%d, '%f', '%f', '%f', '%f', %d, '%f', '%f', '%f', '%f', %d, '%f', '%f', '%f', '%f', '%s', '%s', %d, %d, '%s')",
        
queryHouses[houseid][hInteriorID],
         
Houses[houseid][hInteriorX],
          
Houses[houseid][hInteriorY],
           
Houses[houseid][hInteriorZ],
        
Houses[houseid][hInteriorA],
         
Houses[houseid][hExteriorID],
         
Houses[houseid][hExteriorX],
         
Houses[houseid][hExteriorY],
         
Houses[houseid][hExteriorZ],
         
Houses[houseid][hExteriorA],
         
Houses[houseid][hSpawnID],
         
Houses[houseid][hSpawnX],
          
Houses[houseid][hSpawnY],
           
Houses[houseid][hSpawnZ],
           
Houses[houseid][hSpawnA],
           
Houses[houseid][hOwner],
           
Houses[houseid][hAddress],
         -
1,
          
1,
          
Houses[houseid][hType]);
        
mysql_queryM(query"DefaultCallback");
        new 
query2[400];
        
format(query2sizeof(query2), "SELECT * FROM `Houses` WHERE `HouseID` = %d"houseid); // Selects all the information from the table
        
mysql_queryM(query2,"LoadHousesCallback""d"houseid);
    }
    else
    {
        
//SendClientMessage(SavingVehiclePlayerID, COLOR_WHITE, "There was a "#COL_EMB_RED"fatal error "#COL_EMB_WHITE"during registration! Please contact a developer.");
        
SendClientMessage(playeridCOLOR_WHITE"There was a "#COL_EMB_RED"fatal error "#COL_EMB_WHITE"during registration! Please contact a developer.");
    
}
    return 
1;

I've that now... But the problem is now it's not updating.. but it's creating!
Reply


Messages In This Thread
House doesn't save - by lulo356 - 15.03.2016, 19:39
Re: House doesn't save - by iKevin - 15.03.2016, 19:45
Re: House doesn't save - by thegamer355 - 15.03.2016, 20:15
Re: House doesn't save - by lulo356 - 15.03.2016, 20:35
Re: House doesn't save - by thegamer355 - 15.03.2016, 20:38
Re: House doesn't save - by lulo356 - 15.03.2016, 21:28
Re: House doesn't save - by thegamer355 - 16.03.2016, 06:00
Re: House doesn't save - by lulo356 - 16.03.2016, 13:35
Re: House doesn't save - by thegamer355 - 16.03.2016, 13:44

Forum Jump:


Users browsing this thread: 1 Guest(s)