cache_get_field_content_int - no active cache
#1

When I try to load house system, it loads only one house perfectly



OnHouseLoaded function
PHP Code:
public OnHouseLoaded(){
    new 
name[32],m[512];
    new 
num_fields,num_rows;
    
cache_get_data(num_rows,num_fields,dbhandle);
    if(!
num_rows){
        print(
"Total House Loaded : 0");
        return 
1;
    }
    for(new 
i=0i<num_rowsi++)
    {
        new 
id GetFreeHouseID();
        
HouseInfo[id][HouseID] = id;
        
HouseInfo[id][HouseSQLID] = cache_get_field_content_int(i"ID"dbhandle);
        
HouseInfo[id][HouseOwnerID] = cache_get_field_content_int(i"OwnerID"dbhandle);
        
HouseInfo[id][HouseMarketPrice] = cache_get_field_content_int(i"MarketPrice"dbhandle);
        
HouseInfo[id][HouseExteriorX] = cache_get_field_content_float(i"ExteriorX"dbhandle);
        
HouseInfo[id][HouseExteriorY] = cache_get_field_content_float(i"ExteriorY"dbhandle);
        
HouseInfo[id][HouseExteriorZ] = cache_get_field_content_float(i"ExteriorZ"dbhandle);
        
HouseInfo[id][HouseExteriorA] = cache_get_field_content_float(i"ExteriorA"dbhandle);
        
HouseInfo[id][HouseExteriorInt] = cache_get_field_content_int(i"ExteriorInt"dbhandle);
        
HouseInfo[id][HouseExteriorVW] = cache_get_field_content_int(i"ExteriorVW",  dbhandle);
        
HouseInfo[id][HouseInteriorX] = cache_get_field_content_float(i"InteriorX"dbhandle);
        
HouseInfo[id][HouseInteriorY] = cache_get_field_content_float(i"InteriorY"dbhandle);
        
HouseInfo[id][HouseInteriorZ] = cache_get_field_content_float(i"InteriorZ"dbhandle);
        
HouseInfo[id][HouseInteriorA] = cache_get_field_content_float(i"InteriorA"dbhandle);
        
HouseInfo[id][HouseInteriorInt] = cache_get_field_content_int(i"InteriorInt"dbhandle);
        
HouseInfo[id][HouseLocked] = cache_get_field_content_int(i"Locked"dbhandle);
        
HouseInfo[id][HouseCashBox] = cache_get_field_content_int(i"CashBox"dbhandle);
        
// I rrly do not like this code, but having a loop made the compiler cry :(
        
HouseInfo[id][HouseWeapons][0] = cache_get_field_content_int(i"Weapons0"dbhandle);
        
HouseInfo[id][HouseWeapons][1] = cache_get_field_content_int(i"Weapons1"dbhandle);
        
HouseInfo[id][HouseWeapons][2] = cache_get_field_content_int(i"Weapons2"dbhandle);
        
HouseInfo[id][HouseWeapons][3] = cache_get_field_content_int(i"Weapons3"dbhandle);
        
HouseInfo[id][HouseWeapons][4] = cache_get_field_content_int(i"Weapons4"dbhandle);
        
HouseInfo[id][HouseWeapons][5] = cache_get_field_content_int(i"Weapons5"dbhandle);
        
HouseInfo[id][HouseWeapons][6] = cache_get_field_content_int(i"Weapons6"dbhandle);
        
HouseInfo[id][HouseWeapons][7] = cache_get_field_content_int(i"Weapons7"dbhandle);
        
HouseInfo[id][HouseWeapons][8] = cache_get_field_content_int(i"Weapons8"dbhandle);
        
HouseInfo[id][HouseWeapons][9] = cache_get_field_content_int(i"Weapons9"dbhandle);
        
HouseInfo[id][HouseWeapons][10] = cache_get_field_content_int(i"Weapons10"dbhandle);
        
HouseInfo[id][HouseWeapons][11] = cache_get_field_content_int(i"Weapons11"dbhandle);
        
HouseInfo[id][HouseWeapons][12] = cache_get_field_content_int(i"Weapons12"dbhandle);
        
HouseInfo[id][HouseWeapons][13] = cache_get_field_content_int(i"Weapons13"dbhandle);
        
HouseInfo[id][HouseWeapons][14] = cache_get_field_content_int(i"Weapons14"dbhandle);
        
HouseInfo[id][HouseWeapons][15] = cache_get_field_content_int(i"Weapons15"dbhandle);
        
HouseInfo[id][HouseWeapons][16] = cache_get_field_content_int(i"Weapons16"dbhandle);
        
HouseInfo[id][HouseWeapons][17] = cache_get_field_content_int(i"Weapons17"dbhandle);
        
HouseInfo[id][HouseWeapons][18] = cache_get_field_content_int(i"Weapons18"dbhandle);
        
HouseInfo[id][HouseWeapons][19] = cache_get_field_content_int(i"Weapons19"dbhandle);
        
HouseInfo[id][HouseWeapons][20] = cache_get_field_content_int(i"Weapons20"dbhandle);
        
        
HouseInfo[id][HousePlacePosX] = cache_get_field_content_float(i"PlacePosX"dbhandle);
        
HouseInfo[id][HousePlacePosY] = cache_get_field_content_float(i"PlacePosY"dbhandle);
        
HouseInfo[id][HousePlacePosZ] = cache_get_field_content_float(i"PlacePosZ"dbhandle);
        
HouseInfo[id][HouseBoombox] = cache_get_field_content_int(i"Boombox"dbhandle);
        
HouseInfo[id][HouseWired] = cache_get_field_content_int(i"Wired"dbhandle);
        new 
tmp_name[512];
        
cache_get_field_content(i"Address" ,tmp_namedbhandle);
        
strmid(HouseInfo[id][HouseAddress], tmp_name0sizeof(tmp_name), sizeof(tmp_name));
        
HouseInfo[id][HouseCustomExterior] = cache_get_field_content_int(i"CustomExterior"dbhandle);
        
HouseInfo[i][HouseLocked] = 1;
        
printf("%i |%i | %f %f %f"id,HouseInfo[id][HouseSQLID],HouseInfo[id][HouseExteriorX],HouseInfo[id][HouseExteriorY],HouseInfo[id][HouseExteriorZ]);
        
UpdateHousePickup(id);
    }
    
printf("Total House Loaded: %i"num_rows);
    return 
1;

UpdateHouse:
PHP Code:
UpdateHousePickup(i)
{
    if(
IsValidDynamic3DTextLabel(HouseLabel[i]))
    {
        
DestroyDynamic3DTextLabel(HouseLabel[i]);
    }
    if(
IsValidDynamicPickup(HousePickup[i]))
    {
        
DestroyDynamicPickup(HousePickup[i]);
    }
    if(
HouseInfo[i][HouseSQLID] > 0)
    {
        new 
string[256];
        if(
HouseInfo[i][HouseOwnerID] == 0)
        {
            
format(stringsizeof(string), "[House]\n\n{00FF00}FOR SALE{FFFFFF}\nPrice: $%s\nType /buyhouse to purchase."FormatNumber(HouseInfo[i][HouseMarketPrice]), COLOR_LIGHTBLUE >>> 8);
        }
        else 
        {
            
format(stringsizeof(string), "[House]\n\n{FFFFFF}Owner: %s\nLocked: %s"SQLtoNAME(HouseInfo[i][HouseOwnerID]), (HouseInfo[i][HouseLocked] == ? ("Locked") : ("Unlocked")));
        }
        
HouseLabel[i] = CreateDynamic3DTextLabel(stringCOLOR_LIGHTBLUEHouseInfo[i][HouseExteriorX], HouseInfo[i][HouseExteriorY], HouseInfo[i][HouseExteriorZ]+110.0, .testlos 0, .worldid HouseInfo[i][HouseExteriorVW], .interiorid HouseInfo[i][HouseExteriorInt]);
        if(
HouseInfo[i][HouseOwnerID] == 0)
        {
            
HousePickup[i] = CreateDynamicPickup(12731HouseInfo[i][HouseExteriorX], HouseInfo[i][HouseExteriorY], HouseInfo[i][HouseExteriorZ], .worldid HouseInfo[i][HouseExteriorVW], .interiorid HouseInfo[i][HouseExteriorInt]);
        }
        else 
        {
            
HousePickup[i] = CreateDynamicPickup(12721HouseInfo[i][HouseExteriorX], HouseInfo[i][HouseExteriorY], HouseInfo[i][HouseExteriorZ], .worldid HouseInfo[i][HouseExteriorVW], .interiorid HouseInfo[i][HouseExteriorInt]);
        }
    }

My query (In OnGamemodeInit)
PHP Code:
format(querysizeof(query), "SELECT * FROM houses");
    
mysql_function_query(dbhandlequerytrue"OnHouseLoaded"""); 
mysql_log
PHP Code:
[14:03:27] [WARNINGcache_get_field_content_int no active cache
[14:03:27] [WARNINGcache_get_field_content_int no active cache
[14:03:27] [WARNINGcache_get_field_content_int no active cache
[14:03:27] [WARNINGcache_get_field_content_float no active cache
[14:03:27] [WARNINGcache_get_field_content_float no active cache
[14:03:27] [WARNINGcache_get_field_content_float no active cache
[14:03:27] [WARNINGcache_get_field_content_float no active cache
[14:03:27] [WARNINGcache_get_field_content_int no active cache
[14:03:27] [WARNINGcache_get_field_content_int no active cache
[14:03:27] [WARNINGcache_get_field_content_float no active cache
[14:03:27] [WARNINGcache_get_field_content_float no active cache
[14:03:27] [WARNINGcache_get_field_content_float no active cache
[14:03:27] [WARNINGcache_get_field_content_float no active cache
[14:03:27] [WARNINGcache_get_field_content_int no active cache
[14:03:27] [WARNINGcache_get_field_content_int no active cache
[14:03:27] [WARNINGcache_get_field_content_int no active cache
[14:03:27] [WARNINGcache_get_field_content_int no active cache
[14:03:27] [WARNINGcache_get_field_content_int no active cache
[14:03:27] [WARNINGcache_get_field_content_int no active cache
[14:03:27] [WARNINGcache_get_field_content_int no active cache
[14:03:27] [WARNINGcache_get_field_content_int no active cache
[14:03:27] [WARNINGcache_get_field_content_int no active cache
[14:03:27] [WARNINGcache_get_field_content_int no active cache
[14:03:27] [WARNINGcache_get_field_content_int no active cache
[14:03:27] [WARNINGcache_get_field_content_int no active cache
[14:03:27] [WARNINGcache_get_field_content_int no active cache
[14:03:27] [WARNINGcache_get_field_content_int no active cache
[14:03:27] [WARNINGcache_get_field_content_int no active cache
[14:03:27] [WARNINGcache_get_field_content_int no active cache
[14:03:27] [WARNINGcache_get_field_content_int no active cache
[14:03:27] [WARNINGcache_get_field_content_int no active cache
[14:03:27] [WARNINGcache_get_field_content_int no active cache
[14:03:27] [WARNINGcache_get_field_content_int no active cache
[14:03:27] [WARNINGcache_get_field_content_int no active cache
[14:03:27] [WARNINGcache_get_field_content_int no active cache
[14:03:27] [WARNINGcache_get_field_content_int no active cache
[14:03:27] [WARNINGcache_get_field_content_int no active cache
[14:03:27] [WARNINGcache_get_field_content_float no active cache
[14:03:27] [WARNINGcache_get_field_content_float no active cache
[14:03:27] [WARNINGcache_get_field_content_float no active cache
[14:03:27] [WARNINGcache_get_field_content_int no active cache
[14:03:27] [WARNINGcache_get_field_content_int no active cache
[14:03:27] [WARNINGcache_get_field_content no active cache
[14:03:27] [WARNINGcache_get_field_content_int no active cache
[14:03:27] [WARNINGcache_get_field_content_int no active cache
[14:03:27] [WARNINGcache_get_field_content_int no active cache
[14:03:27] [WARNINGcache_get_field_content_int no active cache
[14:03:27] [WARNINGcache_get_field_content_float no active cache
[14:03:27] [WARNINGcache_get_field_content_float no active cache
[14:03:27] [WARNINGcache_get_field_content_float no active cache
[14:03:27] [WARNINGcache_get_field_content_float no active cache
[14:03:27] [WARNINGcache_get_field_content_int no active cache
[14:03:27] [WARNINGcache_get_field_content_int no active cache
[14:03:27] [WARNINGcache_get_field_content_float no active cache
[14:03:27] [WARNINGcache_get_field_content_float no active cache
[14:03:27] [WARNINGcache_get_field_content_float no active cache
[14:03:27] [WARNINGcache_get_field_content_float no active cache
[14:03:27] [WARNINGcache_get_field_content_int no active cache
[14:03:27] [WARNINGcache_get_field_content_int no active cache
[14:03:27] [WARNINGcache_get_field_content_int no active cache
[14:03:27] [WARNINGcache_get_field_content_int no active cache
[14:03:27] [WARNINGcache_get_field_content_int no active cache
[14:03:27] [WARNINGcache_get_field_content_int no active cache
[14:03:27] [WARNINGcache_get_field_content_int no active cache
[14:03:27] [WARNINGcache_get_field_content_int no active cache
[14:03:27] [WARNINGcache_get_field_content_int no active cache
[14:03:27] [WARNINGcache_get_field_content_int no active cache
[14:03:27] [WARNINGcache_get_field_content_int no active cache
[14:03:27] [WARNINGcache_get_field_content_int no active cache
[14:03:27] [WARNINGcache_get_field_content_int no active cache
[14:03:27] [WARNINGcache_get_field_content_int no active cache
[14:03:27] [WARNINGcache_get_field_content_int no active cache
[14:03:27] [WARNINGcache_get_field_content_int no active cache
[14:03:27] [WARNINGcache_get_field_content_int no active cache
[14:03:27] [WARNINGcache_get_field_content_int no active cache
[14:03:27] [WARNINGcache_get_field_content_int no active cache
[14:03:27] [WARNINGcache_get_field_content_int no active cache
[14:03:27] [WARNINGcache_get_field_content_int no active cache
[14:03:27] [WARNINGcache_get_field_content_int no active cache
[14:03:27] [WARNINGcache_get_field_content_int no active cache
[14:03:27] [WARNINGcache_get_field_content_int no active cache
[14:03:27] [WARNINGcache_get_field_content_float no active cache
[14:03:27] [WARNINGcache_get_field_content_float no active cache
[14:03:27] [WARNINGcache_get_field_content_float no active cache
[14:03:27] [WARNINGcache_get_field_content_int no active cache
[14:03:27] [WARNINGcache_get_field_content_int no active cache
[14:03:27] [WARNINGcache_get_field_content no active cache
[14:03:27] [WARNINGcache_get_field_content_int no active cache
[14:03:27] [WARNINGcache_get_field_content_int no active cache
[14:03:27] [WARNINGcache_get_field_content_int no active cache
[14:03:27] [WARNINGcache_get_field_content_int no active cache
[14:03:27] [WARNINGcache_get_field_content_float no active cache
[14:03:27] [WARNINGcache_get_field_content_float no active cache
[14:03:27] [WARNINGcache_get_field_content_float no active cache
[14:03:27] [WARNINGcache_get_field_content_float no active cache
[14:03:27] [WARNINGcache_get_field_content_int no active cache
[14:03:27] [WARNINGcache_get_field_content_int no active cache
[14:03:27] [WARNINGcache_get_field_content_float no active cache
[14:03:27] [WARNINGcache_get_field_content_float no active cache
[14:03:27] [WARNINGcache_get_field_content_float no active cache
[14:03:27] [WARNINGcache_get_field_content_float no active cache
[14:03:27] [WARNINGcache_get_field_content_int no active cache
[14:03:27] [WARNINGcache_get_field_content_int no active cache
[14:03:27] [WARNINGcache_get_field_content_int no active cache
[14:03:27] [WARNINGcache_get_field_content_int no active cache
[14:03:27] [WARNINGcache_get_field_content_int no active cache
[14:03:27] [WARNINGcache_get_field_content_int no active cache
[14:03:27] [WARNINGcache_get_field_content_int no active cache
[14:03:27] [WARNINGcache_get_field_content_int no active cache
[14:03:27] [WARNINGcache_get_field_content_int no active cache
[14:03:27] [WARNINGcache_get_field_content_int no active cache
[14:03:27] [WARNINGcache_get_field_content_int no active cache
[14:03:27] [WARNINGcache_get_field_content_int no active cache
[14:03:27] [WARNINGcache_get_field_content_int no active cache
[14:03:27] [WARNINGcache_get_field_content_int no active cache
[14:03:27] [WARNINGcache_get_field_content_int no active cache
[14:03:27] [WARNINGcache_get_field_content_int no active cache
[14:03:27] [WARNINGcache_get_field_content_int no active cache
[14:03:27] [WARNINGcache_get_field_content_int no active cache
[14:03:27] [WARNINGcache_get_field_content_int no active cache
[14:03:27] [WARNINGcache_get_field_content_int no active cache
[14:03:27] [WARNINGcache_get_field_content_int no active cache
[14:03:27] [WARNINGcache_get_field_content_int no active cache
[14:03:27] [WARNINGcache_get_field_content_int no active cache
[14:03:27] [WARNINGcache_get_field_content_int no active cache
[14:03:27] [WARNINGcache_get_field_content_float no active cache
[14:03:27] [WARNINGcache_get_field_content_float no active cache
[14:03:27] [WARNINGcache_get_field_content_float no active cache
[14:03:27] [WARNINGcache_get_field_content_int no active cache
[14:03:27] [WARNINGcache_get_field_content_int no active cache
[14:03:27] [WARNINGcache_get_field_content no active cache
[14:03:27] [WARNINGcache_get_field_content_int no active cache
[14:03:27] [WARNINGcache_get_field_content_int no active cache
[14:03:27] [WARNINGcache_get_field_content_int no active cache
[14:03:27] [WARNINGcache_get_field_content_int no active cache
[14:03:27] [WARNINGcache_get_field_content_float no active cache
[14:03:27] [WARNINGcache_get_field_content_float no active cache
[14:03:27] [WARNINGcache_get_field_content_float no active cache
[14:03:27] [WARNINGcache_get_field_content_float no active cache
[14:03:27] [WARNINGcache_get_field_content_int no active cache
[14:03:27] [WARNINGcache_get_field_content_int no active cache
[14:03:27] [WARNINGcache_get_field_content_float no active cache
[14:03:27] [WARNINGcache_get_field_content_float no active cache
[14:03:27] [WARNINGcache_get_field_content_float no active cache
[14:03:27] [WARNINGcache_get_field_content_float no active cache
[14:03:27] [WARNINGcache_get_field_content_int no active cache
[14:03:27] [WARNINGcache_get_field_content_int no active cache
[14:03:27] [WARNINGcache_get_field_content_int no active cache
[14:03:27] [WARNINGcache_get_field_content_int no active cache
[14:03:27] [WARNINGcache_get_field_content_int no active cache
[14:03:27] [WARNINGcache_get_field_content_int no active cache
[14:03:27] [WARNINGcache_get_field_content_int no active cache
[14:03:27] [WARNINGcache_get_field_content_int no active cache
[14:03:27] [WARNINGcache_get_field_content_int no active cache
[14:03:27] [WARNINGcache_get_field_content_int no active cache
[14:03:27] [WARNINGcache_get_field_content_int no active cache
[14:03:27] [WARNINGcache_get_field_content_int no active cache
[14:03:27] [WARNINGcache_get_field_content_int no active cache
[14:03:27] [WARNINGcache_get_field_content_int no active cache
[14:03:27] [WARNINGcache_get_field_content_int no active cache
[14:03:27] [WARNINGcache_get_field_content_int no active cache
[14:03:27] [WARNINGcache_get_field_content_int no active cache
[14:03:27] [WARNINGcache_get_field_content_int no active cache
[14:03:27] [WARNINGcache_get_field_content_int no active cache
[14:03:27] [WARNINGcache_get_field_content_int no active cache
[14:03:27] [WARNINGcache_get_field_content_int no active cache
[14:03:27] [WARNINGcache_get_field_content_int no active cache
[14:03:27] [WARNINGcache_get_field_content_int no active cache
[14:03:27] [WARNINGcache_get_field_content_int no active cache
[14:03:27] [WARNINGcache_get_field_content_float no active cache
[14:03:27] [WARNINGcache_get_field_content_float no active cache
[14:03:27] [WARNINGcache_get_field_content_float no active cache
[14:03:27] [WARNINGcache_get_field_content_int no active cache
[14:03:27] [WARNINGcache_get_field_content_int no active cache
[14:03:27] [WARNINGcache_get_field_content no active cache
[14:03:27] [WARNINGcache_get_field_content_int no active cache 
Database
Reply
#2

Did you try using MySQL query in the MySQL server and see what's your result comes with?

Try using cache_get_field_content
Reply
#3

I'm unfamiliar with the mysql plugin for SAMP so I can't help you on that.

I'm unsure what the "." does in this?
pawn Code:
.worldid = HouseInfo[i][HouseExteriorVW], .interiorid = HouseInfo[i][HouseExteriorInt]
You could try disabling the pickups and see if it then goes through and updates the whole loop.

pawn Code:
UpdateHousePickup(id);
Reply
#4

What version of MySQL plugin are you using? Just use R41.

And I'm pretty sure your problem is with the function `GetFreeHouseID()`. Show us that code as well.

And why would you fetch the empty array using `GetFreeHouseID` in the first place? Just simply loop through the row count and then put in the array what row it's loading from, that is if you didn't get it:

PHP Code:
for (new irows++) {
        
HouseInfo[i][HouseSQLID] = cache_get_field_content_int(i"ID"dbhandle);
        
// ... rest of the code.

And using `HouseInfo[id][HouseID] = id;` is simply useless because the "array slot" [id] is always going to be the same as "HouseID"...

Going deeper to discuss how you used the MySQL is even worse, just use a separate table for storing house weapons LMAO. Vince made a tutorial about it which is as much as relevant today than it was before.
Reply
#5

Quote:
Originally Posted by introzen
View Post
I'm unfamiliar with the mysql plugin for SAMP so I can't help you on that.

I'm unsure what the "." does in this?
pawn Code:
.worldid = HouseInfo[i][HouseExteriorVW], .interiorid = HouseInfo[i][HouseExteriorInt]
You could try disabling the pickups and see if it then goes through and updates the whole loop.

pawn Code:
UpdateHousePickup(id);
When I commented UpdateHousePickup, it works fine but whats wrong in UpdateHousePickup?
Reply
#6

Quote:
Originally Posted by akib
View Post
When I commented UpdateHousePickup, it works fine but whats wrong in UpdateHousePickup?
Well, my money will be on the dots in your arguments. You define an argument by inserting a variable or a value. There's no need to define what argument you want to set since that's decided by the commas.. So,
pawn Code:
HouseLabel[i] = CreateDynamic3DTextLabel(string, COLOR_LIGHTBLUE, HouseInfo[i][HouseExteriorX], HouseInfo[i][HouseExteriorY], HouseInfo[i][HouseExteriorZ]+1, 10.0, .testlos = 0, .worldid = HouseInfo[i][HouseExteriorVW], .interiorid = HouseInfo[i][HouseExteriorInt]);
would have to be
pawn Code:
HouseLabel[i] = CreateDynamic3DTextLabel(string, COLOR_LIGHTBLUE, HouseInfo[i][HouseExteriorX], HouseInfo[i][HouseExteriorY], HouseInfo[i][HouseExteriorZ]+1, 10.0, 0, HouseInfo[i][HouseExteriorVW], HouseInfo[i][HouseExteriorInt]);
And then do the same to the two dynamic pickups.
Reply
#7

Quote:
Originally Posted by introzen
View Post
Well, my money will be on the dots in your arguments. You define an argument by inserting a variable or a value. There's no need to define what argument you want to set since that's decided by the commas.. So,
pawn Code:
HouseLabel[i] = CreateDynamic3DTextLabel(string, COLOR_LIGHTBLUE, HouseInfo[i][HouseExteriorX], HouseInfo[i][HouseExteriorY], HouseInfo[i][HouseExteriorZ]+1, 10.0, .testlos = 0, .worldid = HouseInfo[i][HouseExteriorVW], .interiorid = HouseInfo[i][HouseExteriorInt]);
would have to be
pawn Code:
HouseLabel[i] = CreateDynamic3DTextLabel(string, COLOR_LIGHTBLUE, HouseInfo[i][HouseExteriorX], HouseInfo[i][HouseExteriorY], HouseInfo[i][HouseExteriorZ]+1, 10.0, 0, HouseInfo[i][HouseExteriorVW], HouseInfo[i][HouseExteriorInt]);
And then do the same to the two dynamic pickups.
Still not working
Reply
#8

Try commenting out HouseLabel[i] and both HousePickup[i]'s and see if it works, then you know there's an error in the syntax. I'd think it would've shown during compile though but couldn't hurt to try.
Reply
#9

So you guys completely ignored my solution...

and you use "." when you want to specify a parameter in your code and want the other parameters in between that specific parameter to use default value.

such as:

PHP Code:
CreateDynamicObject(modelidFloat:xFloat:yFloat:zFloat:rxFloat:ryFloat:rzworldid = -1interiorid = -1playerid = -1Float:streamdistance STREAMER_OBJECT_SDFloat:drawdistance STREAMER_OBJECT_DDSTREAMER_TAG_AREA areaid STREAMER_TAG_AREA -1priority 0
You might just want to modify the "streamdistance", why would you define the parameters in between "rz" and "streamdistance"? So you can just directly use:

PHP Code:
CreateDynamicObject(modelidFloat:xFloat:yFloat:zFloat:rxFloat:ryFloat:rz, .streamdistance 100.0); 
Reply
#10

Quote:
Originally Posted by Logic_
View Post
So you guys completely ignored my solution...

and you use "." when you want to specify a parameter in your code and want the other parameters in between that specific parameter to use default value.

such as:

PHP Code:
CreateDynamicObject(modelidFloat:xFloat:yFloat:zFloat:rxFloat:ryFloat:rzworldid = -1interiorid = -1playerid = -1Float:streamdistance STREAMER_OBJECT_SDFloat:drawdistance STREAMER_OBJECT_DDSTREAMER_TAG_AREA areaid STREAMER_TAG_AREA -1priority 0
You might just want to modify the "streamdistance", why would you define the parameters in between "rz" and "streamdistance"? So you can just directly use:

PHP Code:
CreateDynamicObject(modelidFloat:xFloat:yFloat:zFloat:rxFloat:ryFloat:rz, .streamdistance 100.0); 
That's not the problem,

As far i found, it stucks on SQLtoNAME,

surely something is wrong in this function, please help me to find out
PHP Code:
SQLtoNAME(sqlid)
{
    new 
query[120], returnString[60];
    
    
mysql_format(dbhandlequerysizeof(query), "SELECT name FROM `users` WHERE id = '%d' LIMIT 1"sqlid);
    new 
Cache:cache mysql_query(dbhandlequery);
    
    if(!
cache_num_rows())
        
returnString "Unknown";
        
    else
        
cache_get_field_content(0"name"returnString60);
    
    
cache_delete(cache);
    return 
returnString;

Reply
#11

Quote:
Originally Posted by introzen
View Post
I'm unfamiliar with the mysql plugin for SAMP so I can't help you on that.

I'm unsure what the "." does in this?
pawn Code:
.worldid = HouseInfo[i][HouseExteriorVW], .interiorid = HouseInfo[i][HouseExteriorInt]
You could try disabling the pickups and see if it then goes through and updates the whole loop.

pawn Code:
UpdateHousePickup(id);
If you don't know the plugin or basic pawn, why even reply?

I was going to ask you to post SQLtoNAME, since that was the only part of the first code that looked related to SQL and able to cause this (assuming good naming).

The problem is that you are doing a new query in the middle of your old query, then deleting the cache. You are also doing that new one synchronously instead of asynchronously, and why are you not simply merging the two queries?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)