SA-MP Forums Archive
pawno crash - 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 crash (/showthread.php?tid=656699)



pawno crash - Lukasz56 - 21.07.2018

When i put this chunk of a code into my gamemode it just simply crashes , any help ? thanks.

https://pastebin.com/RL6irkuE


Re: pawno crash - Lukasz56 - 21.07.2018

Quote:
Originally Posted by ******
Посмотреть сообщение
Just don't use pawno. I personally recommend Notepad++, but there is tooling for sublime, atom, vs code, and probably others.
i'll give it a try .

UPDATE: it still crashes sublime

update 2 , when i delete this part

Код:
ptask Timer_Hunger[18000](playerid) // 1sec - 1000, 1min - 60000, 3min - 180000
{
    if(!Spawned[playerid]) return 1;
    if(PlayerInfo[playerid][pThirst] <= 0 || PlayerInfo[playerid][pHunger] <= 0)
    {
        new 
            Float:health,
            Float:damage = float(5 + random(5));
        GetPlayerHealth(playerid, health);
        if(health <= damage)
        {
            // dabar nuimsim jau visas HP
            SendClientMessage(playerid, 0xBABABAFF, "Mir?te d?l tro?kulio arba alkio.");
        }
        SetPlayerHealth(playerid, health - damage);
    }
    if(PlayerInfo[playerid][pHunger] > 0) SetHungerLevel(playerid, PlayerInfo[playerid][pHunger] - 1 + random(2));
    if(PlayerInfo[playerid][pThirst] > 0) SetThirstLevel(playerid, PlayerInfo[playerid][pThirst] - 1 + random(2));
    return 1;
}
it shows some errors.


Re: pawno crash - Verc - 22.07.2018

Are you using the community compiler?


Re: pawno crash - Lukasz56 - 22.07.2018

Quote:
Originally Posted by Verc
Посмотреть сообщение
Are you using the community compiler?
If youre talking about sublime, then i downloaded it from the official website.

But i think the problem rather is in the code than compiler.

Up


Re: pawno crash - RODELA - 22.07.2018

make sure you don't have another pawno.exe


Re: pawno crash - Verc - 22.07.2018

I'm talking about this compiler(https://github.com/pawn-lang/compiler),have you set them up just like in this thread? https://sampforum.blast.hk/showthread.php?tid=626423


Re: pawno crash - Lukasz56 - 22.07.2018

Quote:
Originally Posted by Verc
Посмотреть сообщение
I'm talking about this compiler(https://github.com/pawn-lang/compiler),have you set them up just like in this thread? https://sampforum.blast.hk/showthread.php?tid=626423
Yep i did.

But it still crashes


Re: pawno crash - JasonRiggs - 22.07.2018

Did you try using Zeex compiler??


Re: pawno crash - Lukasz56 - 22.07.2018

So you all think that the problem is in the compiler rather than the code?


Re: pawno crash - Lukasz56 - 22.07.2018

Quote:
Originally Posted by ******
Посмотреть сообщение
Yes. The compiler shouldn't crash regardless of how bad your code is. However, there are some bugs in the compiler which means it crashes on certain unusual code. These are things we try to fix in the new compiler
Thanks it works now