PDA

View Full Version : pawno crash


Lukasz56
21/07/2018, 07:32 PM
When i put this chunk of a code into my gamemode it just simply crashes , any help ? thanks.

https://pastebin.com/RL6irkuE

Lukasz56
21/07/2018, 08:56 PM
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.

Verc
22/07/2018, 01:05 AM
Are you using the community compiler?

Lukasz56
22/07/2018, 07:09 AM
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

RODELA
22/07/2018, 07:11 AM
make sure you don't have another pawno.exe

Verc
22/07/2018, 08:25 AM
I'm talking about this compiler(https://github.com/pawn-lang/compiler),have you set them up just like in this thread? http://forum.sa-mp.com/showthread.php?t=626423

Lukasz56
22/07/2018, 10:18 AM
I'm talking about this compiler(https://github.com/pawn-lang/compiler),have you set them up just like in this thread? http://forum.sa-mp.com/showthread.php?t=626423

Yep i did.

But it still crashes

JasonRiggs
22/07/2018, 10:23 AM
Did you try using Zeex compiler??

Lukasz56
22/07/2018, 06:01 PM
So you all think that the problem is in the compiler rather than the code?

Lukasz56
22/07/2018, 07:00 PM
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 :)