string not loading
#1

title.

PHP код:
enum HouseInfo
{
    
HouseNumber,
    
hOwner[35],
    
hLocation[35],
    
Float:hX,
    
Float:hY,
    
Float:hZ,
}
new 
House[200][HouseInfo]; 
PHP код:
forward LoadHouses();
public 
LoadHouses()
{
    if(!
cache_num_rows()) return 1;
    new 
string[200];
    for(new 
i=0i<cache_get_row_count(); i++)
        {
            
House[i][HouseNumber] = cache_get_field_content_int(i,"hID");
            
cache_get_field_content(i,"hOwner",House[i][hOwner]);
            
cache_get_field_content(i,"hLocation",House[i][hLocation]);
            
House[i][hX] = cache_get_field_content_float(i,"hX");
            
House[i][hY] = cache_get_field_content_float(i,"hY");
            
House[i][hZ] = cache_get_field_content_float(i,"hZ");
            
format(string,sizeof(string),"(%i) %s's House - %s",House[i][HouseNumber],House[i][hOwner],House[i][hLocation]);
            
Create3DTextLabel(string,-1,House[i][hX],House[i][hY],House[i][hZ],20,0,0);
        }
    return 
1;

Reply
#2

Can you please explain a bit more what the problem is.
Like what string etc.
Reply
#3

https://sampwiki.blast.hk/wiki/MySQL/R33..._field_content

Read the Important Note.
Reply
#4

Quote:
Originally Posted by Konstantinos
Посмотреть сообщение
hOwner[35],
hLocation[35],

im doing that, right?
Reply
#5

PHP код:
            cache_get_field_content(i,"hLocation",House[i][hLocation], 135); 
That note means sizeof doesn't work and you need to add that parameter manually like this ^^
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)