2 problems with MySQL R40
#3

Quote:
Originally Posted by iLearner
Посмотреть сообщение
About question 1, debug the HouseInfo[hY] value (
PHP код:
printf("%f"HouseInfo[hY]); 
) and post it.

Second one goes this way:
PHP код:
for(new 1MAX_HOUSESh++) 

    new 
house[64], query[1024]; 
    
mysql_format(zMySQLquerysizeof(query), "SELECT * FROM `houses` WHERE `ID` = %d"h); 
    
mysql_tquery(zMySQLquery"LoadHouses""i",h);  
}  
forward LoadHouses(houseid); 
public 
LoadHouses(houseid

    
cache_get_value_name(houseid"Owner"HouseInfo[houseid][hOwner]); 
    
cache_get_value_name_float(houseid"X"HouseInfo[houseid][hX]); 
    
cache_get_value_name_float(houseid"Y"HouseInfo[houseid][hY]); 
    
cache_get_value_name_float(houseid"Z"HouseInfo[houseid][hZ]); 
    
cache_get_value_name_float(houseid"Int:X"HouseInfo[houseid][hiX]); 
    
cache_get_value_name_float(houseid"Int:Y"HouseInfo[houseid][hiY]); 
    
cache_get_value_name_float(houseid"Int:Z"HouseInfo[houseid][hiZ]); 
    
cache_get_value_name_float(houseid"X2"HouseInfo[houseid][hX2]); 
    
cache_get_value_name_float(houseid"Y2"HouseInfo[houseid][hY2]); 
    
cache_get_value_name_float(houseid"Z2"HouseInfo[houseid][hZ2]); 
    
cache_get_value_name_float(houseid"A2"HouseInfo[houseid][hA2]); 
    
cache_get_value_name_float(houseid"Int:X2"HouseInfo[houseid][hiX2]); 
    
cache_get_value_name_float(houseid"Int:Y2"HouseInfo[houseid][hiY2]); 
    
cache_get_value_name_float(houseid"Int:Z2"HouseInfo[houseid][hiZ2]); 
    
cache_get_value_name_float(houseid"Int:A2"HouseInfo[houseid][hiA2]); 
    
cache_get_value_name_float(houseid"Spawn:X"HouseInfo[houseid][hsX]); 
    
cache_get_value_name_float(houseid"Spawn:Y"HouseInfo[houseid][hsY]); 
    
cache_get_value_name_float(houseid"Spawn:Z"HouseInfo[houseid][hsZ]); 
    
cache_get_value_name_float(houseid"Spawn:A"HouseInfo[houseid][hsA]); 
    
cache_get_value_name_int(houseid"Interior"HouseInfo[houseid][hInt]); 
    
cache_get_value_name_int(houseid"World"HouseInfo[houseid][hVW]); 
    
cache_get_value_name_int(houseid"Price"HouseInfo[houseid][hPrice]); 
    
cache_get_value_name_int(houseid"Status"HouseInfo[houseid][hStatus]);
    if( 
strcmp(HouseInfo[h][hOwner], "No"true) == 
    { 
        
HouseInfo[h][hPickup] = CreatePickup(12731HouseInfo[h][hX], HouseInfo[h][hY], HouseInfo[h][hZ]); 
        
HouseInfo[h][hIcon] = CreateDynamicMapIcon(HouseInfo[h][hX], HouseInfo[h][hY], HouseInfo[h][hZ], 310,0,0); 
    } 
    else 
    { 
        
HouseInfo[h][hPickup] = CreatePickup(195221HouseInfo[h][hX], HouseInfo[h][hY], HouseInfo[h][hZ]); 
        
HouseInfo[h][hIcon] = CreateDynamicMapIcon(HouseInfo[h][hX], HouseInfo[h][hY], HouseInfo[h][hZ], 320,0,0); 
    } 
    return 
1

It prints correct!
There is problem with table or code
Can you help me pls! I checked the table and the all floats, that I created are recreated to "double", but X and Z coordinates are saved without any problems!
Reply


Messages In This Thread
2 problems with MySQL R40 - by Kraeror - 05.01.2018, 12:19
Re: 2 problems with MySQL R40 - by iLearner - 05.01.2018, 12:25
Re: 2 problems with MySQL R40 - by Kraeror - 05.01.2018, 12:35
Re: 2 problems with MySQL R40 - by iLearner - 05.01.2018, 12:43
Re: 2 problems with MySQL R40 - by Kraeror - 05.01.2018, 12:52
Re: 2 problems with MySQL R40 - by Kraeror - 05.01.2018, 12:58
Re: 2 problems with MySQL R40 - by Kraeror - 05.01.2018, 13:04
Re: 2 problems with MySQL R40 - by iLearner - 05.01.2018, 13:12
Re: 2 problems with MySQL R40 - by Kraeror - 05.01.2018, 13:18

Forum Jump:


Users browsing this thread: 2 Guest(s)