3 ANNOYING WARNINGS.
#1

I am getting 3 Warnings on a each line, which is pretty annoying.
There are them warnings :
PHP код:
(9606) : warning 213tag mismatch
(9606) : warning 213tag mismatch
(9606) : warning 213tag mismatch 
Line 9606:
pawn Код:
SetPlayerPos(playerid, Player[playerid][hInteriorX], Player[playerid][hInteriorY], Player[playerid][hInteriorZ]);  } } }
Thank you.
Reply
#2

hInteriorX, hInteriorY, hInteriorZ aren't declared with tag float. Declare them like this:
Код:
Float:hInteriorX,
Float:hInteriorY,
Float:hInteriorZ
Reply
#3

Thank you MoroDan.

By the way, do you think that something's wrong down here?
pawn Код:
else if(Player[playerid][House] != 0)
            {
                for(new i = 0; i < sizeof(Houses); i++) {
                if(Player[playerid][PrisonID] != 1) {
                if(Player[playerid][PrisonID] != 2)
                {
                    Player[playerid][InHouse] = i;
                    SetPlayerInterior(playerid, Houses[i][hInteriorID]);
                    SetPlayerVirtualWorld(playerid, 55000+i);
                    SetPlayerPos(playerid, Houses[playerid][hInteriorX], Houses[playerid][hInteriorY], Houses[playerid][hInteriorZ]);  } } }
                }
            }
All of this is on OnPlayerSpawn.
Its supposed to be a function that checks if the player has house, and if he does, it spawning him into his house when logs.
Reply
#4

Try this:
PHP код:
    else if(Player[playerid][House] != 0)
    {
        if(
Player[playerid][PrisonID] != && Player[playerid][PrisonID] != 2)
        {
            
Player[playerid][InHouse] = Player[playerid][House];
            
SetPlayerInterior(playeridHouses[Player[playerid][House]][hInteriorID]);
            
SetPlayerVirtualWorld(playerid55000 playerid);
            
SetPlayerPos(playeridHouses[Player[playerid][House]][hInteriorX], Houses[Player[playerid][House]][hInteriorY], Houses[Player[playerid][House]][hInteriorZ]);  } } }
        }
    } 
Reply
#5

pawn Код:
else if(Player[playerid][House] != 0) {
    for(new i = 0; i < sizeof(Houses); i++) {
        if(Player[playerid][PrisonID] != 1) {
            if(Player[playerid][PrisonID] != 2) {
                Player[playerid][InHouse] = i;
                SetPlayerInterior(playerid, Houses[i][hInteriorID]);
                SetPlayerVirtualWorld(playerid, 55000+i);
                SetPlayerPos(playerid, Houses[playerid][hInteriorX], Houses[playerid][hInteriorY], Houses[playerid][hInteriorZ]);  
            }
        }
    }
}
Indentation helps.
Reply
#6

My pawno crashes when I compile with it.

Dont you think that there is a need of the variable 'i' expect of 'playerid'?
Reply
#7

This works fine:
pawn Код:
else if(Player[playerid][House] != 0)
    {
        if(Player[playerid][PrisonID] != 1 && Player[playerid][PrisonID] != 2)
        {
            Player[playerid][InHouse] = Player[playerid][House];
            SetPlayerInterior(playerid, Houses[Player[playerid][House]][hInteriorID]);
            SetPlayerVirtualWorld(playerid, 55000 + playerid);
            SetPlayerPos(playerid, Houses[Player[playerid][House]][hInteriorX], Houses[Player[playerid][House]][hInteriorY], Houses[Player[playerid][House]][hInteriorZ]);
        }
    }
Reply
#8

Quote:
Originally Posted by jameskmonger
Посмотреть сообщение
This works fine:
pawn Код:
else if(Player[playerid][House] != 0)
    {
        if(Player[playerid][PrisonID] != 1 && Player[playerid][PrisonID] != 2)
        {
            Player[playerid][InHouse] = Player[playerid][House];
            SetPlayerInterior(playerid, Houses[Player[playerid][House]][hInteriorID]);
            SetPlayerVirtualWorld(playerid, 55000 + playerid);
            SetPlayerPos(playerid, Houses[Player[playerid][House]][hInteriorX], Houses[Player[playerid][House]][hInteriorY], Houses[Player[playerid][House]][hInteriorZ]);
        }
    }
Quote:
Originally Posted by MoroDan
Посмотреть сообщение
Try this:
PHP код:
    else if(Player[playerid][House] != 0)
    {
        if(
Player[playerid][PrisonID] != && Player[playerid][PrisonID] != 2)
        {
            
Player[playerid][InHouse] = Player[playerid][House];
            
SetPlayerInterior(playeridHouses[Player[playerid][House]][hInteriorID]);
            
SetPlayerVirtualWorld(playerid55000 playerid);
            
SetPlayerPos(playeridHouses[Player[playerid][House]][hInteriorX], Houses[Player[playerid][House]][hInteriorY], Houses[Player[playerid][House]][hInteriorZ]);  } } }
        }
    } 

? ...
Reply
#9

I think he didnt saw your post MoroDan.
Reply
#10

Quote:
Originally Posted by WoodPecker
Посмотреть сообщение
I think he didnt saw your post MoroDan.
I think he did, because in MoroDan's code there are 3 brackets behind SetPlayerPos that are likely causing the compiler crash.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)