Tag Mismatch Warning -
ProjectMan - 18.08.2013
I have a tag mismatch warning but the script works fine. I just need to know what to edit:
pawn Код:
enum zoneinfo {
zone_name[27],
Float:zone_minx,
Float:zone_miny,
Float:zone_minz,
Float:zone_maxx,
Float:zone_maxy,
Float:zone_maxz
}
new Float:zones[][zoneinfo] = {
{ "LV Drug House (Int)", 2363.7732, -1135.5873, 1050.8750, 2366.7190, -1125.8083, 1050.8826},
{ "Alcatraz", 3539.1328, 382.3327, -5.0000, 4085.4063, 560.8972, 500.5000},
{ "Alcatraz (Int)", 240.3424, 107.4418, 998.0156, 260.3839, 119.8392, 1008.8303},
{ "Alcatraz (Int)", 213.9791, 107.4416, 999.0100, 229.0557, 116.0217, 999.0180}};
pawn Код:
public OnGameModeInit();
{
for(new i; i < sizeof(zones); i++)
{
format(TeleMenuString,sizeof(TeleMenuString),"%s\n%s",TeleMenuString,zones[i][0]); //warning
}
return 1;
}
It works tho. TeleMenuString contains the zone_name (as I wanted) but there is the warning. The warning is because of zones[i][0].
Re: Tag Mismatch Warning -
Youarex - 18.08.2013
pawn Код:
new Float:zones[][zoneinfo] = {
{ "LV Drug House (Int)", 2363.7732, -1135.5873, 1050.8750, 2366.7190, -1125.8083, 1050.8826},
{ "Alcatraz", 3539.1328, 382.3327, -5.0000, 4085.4063, 560.8972, 500.5000},
{ "Alcatraz (Int)", 240.3424, 107.4418, 998.0156, 260.3839, 119.8392, 1008.8303},
{ "Alcatraz (Int)", 213.9791, 107.4416, 999.0100, 229.0557, 116.0217, 999.0180}
};
The data type is float and I believe you cannot assign string to a float data type.
Re: Tag Mismatch Warning -
ProjectMan - 18.08.2013
Quote:
Originally Posted by ******
Use "zone_name" not "0".
|
Thanks ******! But can you explain why so? I must register this one in my pawn experience vault. ^^
Re: Tag Mismatch Warning -
SuperViper - 18.08.2013
Warnings don't always prevent your script from working. Sometimes it just means your code doesn't follow standards.
Re: Tag Mismatch Warning -
Vince - 18.08.2013
Remove the Float: tag from the array.
Re: Tag Mismatch Warning -
ProjectMan - 18.08.2013
Quote:
Originally Posted by Vince
Remove the Float: tag from the array.
|
Thanks to you too. It's touching seeing so many experienced scripters helping me out...


Fixed.