SA-MP Forums Archive
Command Crashes the Server - 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: Command Crashes the Server (/showthread.php?tid=495109)



Command Crashes the Server - ZBits - 16.02.2014

Fixed


Re: Command Crashes the Server - Phil_Cutcliffe - 16.02.2014

Does the place you're trying to save the information to exist? Like the table in the database for example.


Re: Command Crashes the Server - ZBits - 16.02.2014

Yup it definitely does


Re: Command Crashes the Server - CuervO - 16.02.2014

Add debug information and check which part it crashes at.


Re: Command Crashes the Server - ZBits - 16.02.2014

Mind helping me placing them?


Re: Command Crashes the Server - CuervO - 16.02.2014

https://sampwiki.blast.hk/wiki/Debugging


Re: Command Crashes the Server - GODEX - 16.02.2014

Quote:
Originally Posted by Domnic Toretto
Посмотреть сообщение
Mind helping me placing them?
Go through your code and type theses:

print("Stage 1");
print("Stage 2");
print("Stage 3");
print("Stage 4");
print("Stage 5");

Place these in your code so you can see when the server stops. For example If you type the command and look in your console and it only shows Stage 1 - 3 then you know the error is around Stage 4


Re: Command Crashes the Server - Scenario - 16.02.2014

Indent your code and you'll (likely) find the problem.


Re: Command Crashes the Server - Konstantinos - 16.02.2014

Load crashdetect plugin and for the debug info: https://github.com/Zeex/samp-plugin-...ith-debug-info
Re-compile your scripts, start the server and execute the command. After a crash, post the server log.

The only thing I'd think of is array index out of bounds because of the vInfo array and the loop until MAX_DEALERSHIPC. I might be wrong, so waiting for the results.


Re: Command Crashes the Server - ZBits - 16.02.2014

Код:
[09:08:07]
[debug] Server crashed while executing LR2.amx
[debug] AMX backtrace:
[09:08:07] [debug] #0 native strcmp () [00406540] from samp-server.exe
[09:08:07] [debug] #1 0003f4b8 in public cmd_buycar (0x00000000, 0x00131e48) from rp.amx
[09:08:07] [debug] #2 native CallLocalFunction () [00471ef0] from samp-server.exe
[09:08:07] [debug] #3 00000710 in public OnPlayerCommandText (0x00000000, 0x00131e28) from rp.amx
[09:08:07] [debug] Native backtrace:
[09:08:07] [debug] #0 76634f1d in ?? () from C:\Windows\syswow64\USER32.dll
[09:08:07] [debug] #1 004061b4 in ?? () from samp-server.exe
Here is what i got.