Tag Mismatch
#1

I have some confusing(for me) errors
Код:
(34197) : warning 213: tag mismatch
(34198) : warning 213: tag mismatch
(34199) : warning 213: tag mismatch
(34208) : warning 213: tag mismatch
(34209) : warning 213: tag mismatch
(34210) : warning 213: tag mismatch
Lines:

PHP код:
stock IsBizInZone(bizidzoneid)
{
    if(
zoneid == -1) return false;
    new 
a,b,c;
    
BusinessInfo[bizid][bEntranceX];
    
BusinessInfo[bizid][bEntranceY];
    
BusinessInfo[bizid][bEntranceZ];
    if(
BusinessInfo[bizid][bEntranceX] >= SanAndreasZones[zoneid][Zone_Area][0] && SanAndreasZones[zoneid][Zone_Area][3] && >= SanAndreasZones[zoneid][Zone_Area][1] && SanAndreasZones[zoneid][Zone_Area][4] && >= SanAndreasZones[zoneid][Zone_Area][2] && SanAndreasZones[zoneid][Zone_Area][5] && 900.0) return true;
    return 
false;
}
stock IsHouseInZone(houseidzoneid)
{
    if(
zoneid == -1) return false;
    new 
a,b,c;
    
HouseInfo[houseid][hEntranceX];
    
HouseInfo[houseid][hEntranceY];
    
HouseInfo[houseid][hEntranceZ];
    if(
HouseInfo[houseid][hEntranceX] >= SanAndreasZones[zoneid][Zone_Area][0] && SanAndreasZones[zoneid][Zone_Area][3] && >= SanAndreasZones[zoneid][Zone_Area][1] && SanAndreasZones[zoneid][Zone_Area][4] && >= SanAndreasZones[zoneid][Zone_Area][2] && SanAndreasZones[zoneid][Zone_Area][5] && 900.0) return true;
    return 
false;

Line Errors:
PHP код:
BusinessInfo[bizid][bEntranceX];
BusinessInfo[bizid][bEntranceY];
BusinessInfo[bizid][bEntranceZ];
HouseInfo[houseid][hEntranceX];
HouseInfo[houseid][hEntranceY];
HouseInfo[houseid][hEntranceZ]; 
Reply
#2

You need to define a, b, c as floats, the same type as the variables you are assigning to them.
Код:
new Float:a,Float:b,Float:c;
Reply
#3

Yeah, add "Float:" tag before the variable name

PHP код:
stock IsBizInZone(bizidzoneid

    if(
zoneid == -1) return false
    new 
Float:a,Float:b,Float:c
    
BusinessInfo[bizid][bEntranceX]; 
    
BusinessInfo[bizid][bEntranceY]; 
    
BusinessInfo[bizid][bEntranceZ]; 
    if(
BusinessInfo[bizid][bEntranceX] >= SanAndreasZones[zoneid][Zone_Area][0] && SanAndreasZones[zoneid][Zone_Area][3] && >= SanAndreasZones[zoneid][Zone_Area][1] && SanAndreasZones[zoneid][Zone_Area][4] && >= SanAndreasZones[zoneid][Zone_Area][2] && SanAndreasZones[zoneid][Zone_Area][5] && 900.0) return true
    return 
false

stock IsHouseInZone(houseidzoneid

    if(
zoneid == -1) return false
    new 
Float:a,Float:b,Float:c
    
HouseInfo[houseid][hEntranceX]; 
    
HouseInfo[houseid][hEntranceY]; 
    
HouseInfo[houseid][hEntranceZ]; 
    if(
HouseInfo[houseid][hEntranceX] >= SanAndreasZones[zoneid][Zone_Area][0] && SanAndreasZones[zoneid][Zone_Area][3] && >= SanAndreasZones[zoneid][Zone_Area][1] && SanAndreasZones[zoneid][Zone_Area][4] && >= SanAndreasZones[zoneid][Zone_Area][2] && SanAndreasZones[zoneid][Zone_Area][5] && 900.0) return true
    return 
false

Reply
#4

That's what I've been missing. Thanks, guys.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)