SA-MP Forums Archive
GameText crashing client - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: GameText crashing client (/showthread.php?tid=346320)



GameText crashing client - iGetty - 28.05.2012

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!


Re: GameText crashing client - mati233 - 28.05.2012

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~"


Re: GameText crashing client - CidadeNovaRP - 28.05.2012

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 "~".


Re: GameText crashing client - iGetty - 28.05.2012

Thanks guys!