undefined symbol i?
#1

PHP код:
if(HouseInfo[i][hOwned] = false
this it giving the error that undefined symbol i.
I have all the defines like define like:
PHP код:
#define MAX_HOUSES 100 
I have this one to :
PHP код:
new HouseInfo[MAX_HOUSES][hInfo]; 
Please help.
Reply
#2

Show more code surrounding if(HouseInfo[i][hOwned] = false)
i usually means it's a loop, so show whole loop if there is one
Reply
#3

PHP код:
        if(IsPlayerInRangeOfPoint(playerid1.5,-2789.1965,-181.2355,10.0625))
        {
            {
                if(
HouseInfo[i][hOwned] = false)
                
GameTextForPlayer(playerid,"blablabla",3000,5);
            }
            else
            {
                
GameTextForPlayer(playerid,"blablablabla",3000,5);
            }
        } 
I am using them like this.
Reply
#4

Still not enough. You don't have any i variable in sight. Show more code before, or try to find "i" variable. Otherwise you have variable with other name holding the id of house
Reply
#5

PHP код:
{
        if(
IsPlayerInRangeOfPoint(playerid1.5,-2789.1965,-181.2355,10.0625))
        {
            {
                if(
HouseInfo[i][hOwned] = false)
                
GameTextForPlayer(playerid,"blablabla",3000,5);
            }
            else
            {
                
GameTextForPlayer(playerid,"blablablabla",3000,5);
            }
        }
        if(
IsPlayerInRangeOfPoint(playerid1.5,-2786.7607,-175.4513,10.0625))
        {
            {
                if(
HouseInfo[i][hOwned] = false)
                
GameTextForPlayer(playerid,"House for sale",3000,5);
            }
        else
            {
                
GameTextForPlayer(playerid,"House is owned",3000,5);
            }
        }
        if(
IsPlayerInRangeOfPoint(playerid1.5,-2790.3088,-168.4088,7.2020))
          {
            {
                if(
HouseInfo[i][hOwned] = false)
                
GameTextForPlayer(playerid,"House for sale",3000,5);
            }
            else
            {
                
GameTextForPlayer(playerid,"House is owned",3000,5);
            }
        }
         if(
IsPlayerInRangeOfPoint(playerid1.5,-2791.5959,-146.0833,7.8594))
          {
            {
                if(
HouseInfo[i][hOwned] = false)
                
GameTextForPlayer(playerid,"House for sale",3000,5);
            }
            else
            {
                
GameTextForPlayer(playerid,"House is owned",3000,5);
            }
        }
           if(
IsPlayerInRangeOfPoint(playerid1.5,-2786.9595,-118.3625,10.0625))
          {
            {
                if(
HouseInfo[i][hOwned] = false)
                
GameTextForPlayer(playerid,"House for sale",3000,5);
            }
            else
            {
                
GameTextForPlayer(playerid,"House is owned",3000,5);
            }
        }
        if(
IsPlayerInRangeOfPoint(playerid1.5,-2790.2976,-110.8887,7.2020))
        {
            {
                if(
HouseInfo[i][hOwned] = false)
                
GameTextForPlayer(playerid,"House for sale",3000,5);
            }
            else
            {
                
GameTextForPlayer(playerid,"House is owned",3000,5);
            }
        }
         if(
IsPlayerInRangeOfPoint(playerid1.5,-2791.5867,-107.4266,7.8594))
          {
            {
                if(
HouseInfo[i][hOwned] = false)
                
GameTextForPlayer(playerid,"House for sale",3000,5);
            }
            else
            {
                
GameTextForPlayer(playerid,"House is owned",3000,5);
            }
        }
          if(
IsPlayerInRangeOfPoint(playerid1.5,-2786.9756,-89.7384,10.0625))
          {
            {
                if(
HouseInfo[i][hOwned] = false)
                
GameTextForPlayer(playerid,"House for sale",3000,5);
            }
            else
            {
                
GameTextForPlayer(playerid,"House is owned",3000,5);
            }
        }
           if(
IsPlayerInRangeOfPoint(playerid1.5,-2790.2649,-82.7106,7.1953))
          {
            {
                if(
HouseInfo[i][hOwned] = false)
                
GameTextForPlayer(playerid,"House for sale",3000,5);
            }
            else
            {
                
GameTextForPlayer(playerid,"House is owned",3000,5);
            }
        }
    return 
1;

Reply
#6

bump...
Please help.
Reply
#7

bump please please please help.
Reply
#8

You should use a Loop
Reply
#9

pawn Код:
for(new h = 0; h < sizeof(hInfo); h++) {
//stuff here
}
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)