17.12.2012, 14:26
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:
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...
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:
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.
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);
Код:
SetPlayerPos(playerid,0,0,0);
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.
I hope I'll get some answers, because the topic is too long and it should be rare for people.