SA-MP Forums Archive
tag mismatch - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: tag mismatch (/showthread.php?tid=608001)



tag mismatch - justjamie - 26.05.2016

Hello.
When i compile this:
PHP код:
forward ToLoadCars(playerid);
public 
ToLoadCars(playerid)
{
new 
num_fields2,num_rows2;
cache_get_data(num_rows2,num_fields2,dbhandle);
if(
num_rows2==1)
{
for(new 
0sizeof(num_rows2); i++)
{
cInfo[i][db_id]=cache_get_field_content_float(0,"id",dbhandle);
cInfo[i][carmodelid]=cache_get_field_content_int(0,"model",dbhandle);
cInfo[i][c_x]=cache_get_field_content_float(0,"x",dbhandle);
cInfo[i][c_y]=cache_get_field_content_float(0,"y",dbhandle);
cInfo[i][c_z]=cache_get_field_content_float(0,"z",dbhandle);
cInfo[i][c_r]=cache_get_field_content_float(0,"a",dbhandle);
cInfo[i][c_color1]=cache_get_field_content_int(0,"color1",dbhandle);
cInfo[i][c_color2]=cache_get_field_content_int(0,"color2",dbhandle);
cInfo[i][c_respawntime]=cache_get_field_content_int(0,"autorespawn",dbhandle);
cInfo[i][carteam]=cache_get_field_content_int(0,"carteam",dbhandle);
}
return 
1;
}
else
{
return 
1;
}

I get a warning about a 'tag mismatch".
It's about this line:
PHP код:
cInfo[i][db_id]=cache_get_field_content_float(0,"id",dbhandle); 
Someone any idea?


Re: tag mismatch - Stinged - 26.05.2016

Either db_id is supposed to be a float (You forgot to add Float: in the enum) or the function is supposed to be ...content_int


Re: tag mismatch - TaiRinsuru - 26.05.2016

Add this on your enum:
PHP код:
Float:db_id 
I dont know how it works


Re: tag mismatch - justjamie - 26.05.2016

Quote:
Originally Posted by TaiRinsuru
Посмотреть сообщение
Add this on your enum:
PHP код:
Float:db_id 
I dont know how it works
db_id is the ID in the database.


Re: tag mismatch - Stinged - 26.05.2016

Then use cache_get_field_content_int instead.


Re: tag mismatch - justjamie - 26.05.2016

Quote:
Originally Posted by Stinged
Посмотреть сообщение
Then use cache_get_field_content_int instead.
welp i see it, thanks