awkward error - 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: awkward error (
/showthread.php?tid=398643)
awkward error -
Blunt P - 10.12.2012
Hey everyone,
i have a very awkward issue. For some reasons i keep getting an error when playing on my Server.
I keep getting this in my Console/Serverlog:
PHP код:
[15:08:54] [debug] Run time error 5: "Invalid memory access"
[15:08:54] [debug] AMX backtrace:
[15:08:54] [debug] #0 0003c800 in public OnPlayerCommandText (playerid=8, cmdtext[]=@0x000ce82c "") at C:blablabla\gamemode.pwn:2893
The line is:
PHP код:
public OnPlayerCommandText(playerid, cmdtext[])
What could i do to solve this problem? Its really annoyng ~.~
Re: awkward error -
Lordzy - 10.12.2012
Did you return 0 the callback? Or show the code under OnPlayerCommandText.
AW: awkward error -
Blunt P - 10.12.2012
I won't show the whole code, since its huge. The Callback does return 0.
The werid part is, that it just runs the Callback for no known reason. While your playing its being called by something. The player gets 'Command Unkown' while being on Desktop, driving or something else.
Its super awkward o_O
Re: awkward error -
iggy1 - 10.12.2012
Your probably accessing cmdtext out of bounds.
Example:
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
new t = -1111222;
cmdtext[t] = 5;//same error
return 0;
}
AW: awkward error -
Blunt P - 10.12.2012
Quote:
Originally Posted by iggy1
Your probably accessing cmdtext out of bounds.
Example:
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[]) { new t = -1111222; cmdtext[t] = 5;//same error return 0; }
|
Well the Problem is, that i don't even write something. I mean normally the callback should be executed when i type something, but it doesn't. I have no clue, how i could backtrace that :/
Re: awkward error -
iggy1 - 10.12.2012
Create a .cfg file in the same destination as your pawn compiler.
Inside the config file put,
And save it.
Recompile your code. Download and install the
Crashdetect plugin Run your mode, now when the error happens again it will tell you the exact line in your code that crashed the server.
Don't forget to remove the config file when your finished debugging it will slow your code slightly.
AW: Re: awkward error -
Blunt P - 10.12.2012
Quote:
Originally Posted by iggy1
Create a .cfg file in the same destination as your pawn compiler.
Inside the config file put,
And save it.
Recompile your code. Download and install the Crashdetect plugin Run your mode, now when the error happens again it will tell you the exact line in your code that crashed the server.
Don't forget to remove the config file when your finished debugging it will slow your code slightly.
|
As you may have noticed, my first post accually shows the debug. I even posted the line