Function bugged.
#1

Hello.

This function is used to return whether or not I own a house.

However, if I do not have a house it returns me that I have a ...

And if I have one, it also returns me that I have a ...

How?

pawn Код:
forward House_Proprio(playerid, iddhouse);
public House_Proprio(playerid, iddhouse)
{
    if(iddhouse == -1)
    {
        return 0;
    }
    if(strcmp(NameRequete[playerid], HouseInfo[iddhouse][Proprio], true) == 0)
    {
        return 1;
    }
    return 0;
}
Reply
#2

add
pawn Код:
if(HouseInfo[iddhouse][Proprio][0] == EOS) return 0;
or

pawn Код:
if(HouseInfo[iddhouse][Proprio][0] && strcmp(NameRequete[playerid], HouseInfo[iddhouse][Proprio], true) == 0)
Reply
#3

pawn Код:
forward House_Proprio(playerid, iddhouse);
public House_Proprio(playerid, iddhouse)
{
    if(iddhouse == -1)
    {
        return 0;
    }
    if(!strcmp(NameRequete[playerid], HouseInfo[iddhouse][Proprio])) //this line, added the ! at the beginning.
    {
        return 1;
    }
    return 0;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)