GameText crashing client
#1

pawn Код:
public PickupMessages(playerid)
{
    new string[256];
    for(new h = 1; h < MAX_HOUSES; h++)
    {
        if(IsPlayerInRangeOfPoint(playerid, 5.0, Houses[h][HouseExteriorX], Houses[h][HouseExteriorY], Houses[h][HouseExteriorZ]))
        {
            if(GetPlayerVirtualWorld(playerid) == 0)
            {
                format(string, sizeof(string), "House %d~n~Price: $%d~n~Name: %s~n~Owner: %s~", h, Houses[h][HousePrice], Houses[h][HouseName], Houses[h][HouseOwner]);
            }
        }
    }
    GameTextForPlayer(playerid, string, 3000, 5);
    return 1;
}
That crashes my game instead of showing any text what so ever. What's wrong?
Thanks!
Reply
#2

I'm not sure if this is the problem, but try to remove that:
format(string, sizeof(string), "House %d~n~Price: $%d~n~Name: %s~n~Owner: %s~"
Reply
#3

pawn Код:
format(string, sizeof(string), "House %d~n~Price: $%d~n~Name: %s~n~Owner: %s", h, Houses[h][HousePrice], Houses[h][HouseName], Houses[h][HouseOwner]);
Atention to "~".
Reply
#4

Thanks guys!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)