awkward error
#1

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] [debugRun time error 5"Invalid memory access"
[15:08:54] [debugAMX 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(playeridcmdtext[]) 
What could i do to solve this problem? Its really annoyng ~.~
Reply
#2

Did you return 0 the callback? Or show the code under OnPlayerCommandText.
Reply
#3

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
Reply
#4

Your probably accessing cmdtext out of bounds.

Example:

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    new t = -1111222;
    cmdtext[t] = 5;//same error
    return 0;
}
Reply
#5

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 :/
Reply
#6

Create a .cfg file in the same destination as your pawn compiler.

Inside the config file put,
Код:
-d3
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.
Reply
#7

Quote:
Originally Posted by iggy1
Посмотреть сообщение
Create a .cfg file in the same destination as your pawn compiler.

Inside the config file put,
Код:
-d3
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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)