SA-MP Forums Archive
Pawno crashing - 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: Pawno crashing (/showthread.php?tid=560790)



Pawno crashing - DavidSparks - 30.01.2015

Hey guys.

So when I add this,

PreparePlayerTextDraws();

or

PreparePlayerTextDraws(playerid);

to my GameModeInIt or OnPlayerConnect, then PAWNO crashes.

Here's my PreparePlayerTextDraws code.

pawn Код:
stock PreparePlayerTextDraws(playerid)
    {
        FuelTD[playerid] = TextDrawCreate(520.000000, 378.000000, "~r~FUEL:~l~ l~w~lllllllll~r~l~l~l");
        TextDrawBackgroundColor(FuelTD[playerid], 255);
        TextDrawFont(FuelTD[playerid], 1);
        TextDrawLetterSize(FuelTD[playerid], 0.360000, 1.399999);
        TextDrawColor(FuelTD[playerid], -1);
        TextDrawSetOutline(FuelTD[playerid], 1);
        TextDrawSetProportional(FuelTD[playerid], 1);

        SpeedoTD[playerid] = TextDrawCreate(520.000000, 391.000000, "~g~SPEED:~w~ 100 MPH");
        TextDrawBackgroundColor(SpeedoTD[playerid], 255);
        TextDrawFont(SpeedoTD[playerid], 1);
        TextDrawLetterSize(SpeedoTD[playerid], 0.360000, 1.399999);
        TextDrawColor(SpeedoTD[playerid], -1);
        TextDrawSetOutline(SpeedoTD[playerid], 1);
        TextDrawSetProportional(SpeedoTD[playerid], 1);

        MilesTD[playerid] = TextDrawCreate(520.000000, 404.000000, "~r~MILES:~w~ 0");
        TextDrawBackgroundColor(MilesTD[playerid], 255);
        TextDrawFont(MilesTD[playerid], 1);
        TextDrawLetterSize(MilesTD[playerid], 0.360000, 1.399999);
        TextDrawColor(MilesTD[playerid], -1);
        TextDrawSetOutline(MilesTD[playerid], 1);
        TextDrawSetProportional(MilesTD[playerid], 1);
        return 1;
    }
What can be wrong?


Re: Pawno crashing - DavidSparks - 30.01.2015

Quote:
Originally Posted by ******
Посмотреть сообщение
Try a different editor, I tend to use Notepad++.
How to compile in Notepad++?


Re: Pawno crashing - Snich - 30.01.2015

Problem is here:

Код:
~r~FUEL:~l~ l~w~lllllllll~r~l~l~l
Try like this:

Код:
~r~FUEL: ll~w~lllllllll~r~lll



Re: Pawno crashing - DavidSparks - 30.01.2015

Quote:
Originally Posted by Snich
Посмотреть сообщение
Problem is here:

Код:
~r~FUEL:~l~ l~w~lllllllll~r~l~l~l
Try like this:

Код:
~r~FUEL: ll~w~lllllllll~r~lll
It works! Thank you so much, +rep.