SA-MP Forums Archive
PAWNO crashes after compiling, but works well for other - 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 crashes after compiling, but works well for other (/showthread.php?tid=400215)



PAWNO crashes after compiling, but works well for other - Libra_PL - 17.12.2012

Hello,

I have got a strange problem with my gamemode script. I've been creating some stuff and when I wanted to save it by compiling, it started to crash. It took over 30 minutes to find what causes it - two different lines. When I commented (by //) one of them, it compiled fine. If the second one, it's good too. But if they aren't commented - my PAWNO crashes (I also add that they are in different callbacks and they don't relate to the same thing).

I thought it's a script problem, that's why I was finding how to fix it. Everything was fine. I sent the gamemode to my friend, and when he pressed F5, it compiled fine! Even with lines which were not commented.

It's one of lines (which I didn't touch for many weeks) that caused the problem:

Код:
SetPlayerPos(playerid,ShopLocations[i][0],ShopLocations[i][1],ShopLocations[i][2]-50);
Someone would think that it's a problem with creating ShopLocations. It also thought about the same thing, but it worked before and everything was fine - that's why I didn't find any problems. For a test I replaced this line to...

Код:
SetPlayerPos(playerid,0,0,0);
And this also caused a crash! A simple SetPlayerPos shouldn't do that, yeah?

Then it would be a problem somewhere else (probably in the same callback), but it looks good. So, just tell me one thing - if it works well for my friend, why it doesn't for me? What should I do? Replace my PAWNO with same files in SA-MP download or what? For more information, the compiled script for my friend runs fine - SetPlayerPos works good.

I'll also add that once I was trying to fix it and it compiled without any errors and warnings. After starting the server I got this message:

Код:
Run time error 17: "Invalid/unsupported P-code file format" Failed to load 'gamemodes/Christmas.amx' script.
It's probably not needed to this, because the .amx file had 0 kb.

I hope I'll get some answers, because the topic is too long and it should be rare for people.


Re: PAWNO crashes after compiling, but works well for other - Konstantinos - 17.12.2012

Download the 0.3e package server and add your gamemode, necessary plugins/includes and try to compile it again.


Re: PAWNO crashes after compiling, but works well for other - Libra_PL - 17.12.2012

I have updated all files (and to 0.3e R2 too) and I don't have this problem anymore. Something was wrong with the files.

Thanks for anwsers!