Vehicles are not loading -
FaZeRs - 19.02.2014
So when i start my server it don't loads vehicles, it says there is 0. Who can help?
Log
PHP код:
----------
Loaded log file: "server_log.txt".
----------
SA-MP Dedicated Server
----------------------
v0.3z, (C)2005-2014 SA-MP Team
[16:51:37]
[16:51:37] Server Plugins
[16:51:37] --------------
[16:51:37] Loading plugin: mysql
[16:51:37]
> MySQL plugin R5 successfully loaded.
[16:51:37] Loaded.
[16:51:37] Loading plugin: socket
[16:51:37] Socket plugin v0.1b loaded.
[16:51:37] Loaded.
[16:51:37] Loading plugin: sscanf
[16:51:37]
[16:51:37] ===============================
[16:51:37] sscanf plugin loaded.
[16:51:37] Version: 2.8.1
[16:51:37] (c) 2012 Alex "******" Cole
[16:51:37] ===============================
[16:51:37] Loaded.
[16:51:37] Loading plugin: streamer
[16:51:37]
*** Streamer Plugin v2.7 by Incognito loaded ***
[16:51:37] Loaded.
[16:51:37] Loaded 4 plugins.
[16:51:37]
[16:51:37] Filterscripts
[16:51:37] ---------------
[16:51:37] Loading filterscript 'Tgarage.amx'...
[16:51:37] Loading filterscript 'gm_custmapping.amx'...
[16:51:37] Loading filterscript 'buttons.amx'...
[16:51:37] Loaded 3 filterscripts.
[16:51:37]
[16:51:37]
[16:51:37]
[16:51:37] =======================================
[16:51:37] | |
[16:51:37] | YSI version 3.09.0684 |
[16:51:37] | By Alex "******" Cole |
[16:51:37] | |
[16:51:37] =======================================
[16:51:37]
[16:51:37]
[16:51:37]
[16:51:37] onfoot_rate = 40 (int, read-only)
[16:51:37] incar_rate = 40 (int, read-only)
[16:51:37] weapon_rate = 40 (int, read-only)
[16:51:38] Listen server running on port 58000
[16:51:39] [LoadPoints] 0 points loaded.
[16:51:39]
[16:51:39] -------------------------------------------
[16:51:39] Loading...
[16:51:39] City Life RolePlay copyright Jack Robertson. - 2014
[16:51:39] -------------------------------------------
[16:51:39]
[16:51:39] Number of vehicle models: 0
Re: Vehicles are not loading -
[RO]Five - 19.02.2014
download and load plugin crashdetact
Re: Vehicles are not loading -
PowerPC603 - 19.02.2014
There might be something wrong in your OnGameModeInit which crahes your script.
You can try to use print-statements between your code to see which print-statements gets printed to your console last.
Then the problem is right below it.
pawn Код:
public OnGameModeInit()
{
// code here
print("Debug line 1");
// code here
print("Debug line 2");
// code here
print("Debug line 3"); // Example: this message is printed last
// code here // <------ the error must be in this code, and the rest of the code won't get executed
print("Debug line 4");
// code here
print("Debug line 5");
}
If the last message printed would be "Debug line 3", then the problem is located between the print-statements "Debug line 3" and "Debug line 4", as the script crashes before it reached "Debug line 4".
Re: Vehicles are not loading -
adammal - 19.02.2014
Don't use a stolen script.
Re: Vehicles are not loading -
FaZeRs - 19.02.2014
It just don't loads anything.
http://pastebin.com/uukXBx0B This is my OnGameModeInit
Re: Vehicles are not loading -
FaZeRs - 19.02.2014
And what crashdetect says
PHP код:
[00:54:51] [debug] Run time error 4: "Array index out of bounds"
[00:54:51] [debug] Accessing element at index 15 past array upper bound 14
[00:54:51] [debug] AMX backtrace:
[00:54:51] [debug] #0 000d9c58 in ?? () from clrp.amx
[00:54:51] [debug] #1 000ed410 in public SSCANF_OnGameModeInit () from clrp.amx
[00:54:51] [debug] #2 0000fdb0 in public zcmd_OnGameModeInit () from clrp.amx
[00:54:51] [debug] #3 native CallLocalFunction () [00472ad0] from samp-server.exe
[00:54:51] [debug] #4 0000f880 in ?? () from clrp.amx
[00:54:51] [debug] #5 00009030 in public Itter_OnGameModeInit () from clrp.amx
[00:54:51] [debug] #6 native CallLocalFunction () [00472ad0] from samp-server.exe
[00:54:51] [debug] #7 000026ac in public ScriptInit_OnGameModeInit () from clrp.amx
[00:54:51] [debug] #8 00001630 in public OnGameModeInit () from clrp.amx
Re: Vehicles are not loading -
Konstantinos - 19.02.2014
Latest version of crashdetect (if you use an older version, then you'll need to update it):
https://github.com/Zeex/samp-plugin-...ases/tag/v4.13
Compile with debug info:
https://github.com/Zeex/samp-plugin-...ith-debug-info
Re-compile your scripts, run the server and post the server log. I'll give you an example of what it can be wrong:
pawn Код:
for(new c=0; c<MAX_SPEEDCAMS; c++) {
CreateDynamicObject(18880, SpeedCams[c][SCamX], SpeedCams[c][SCamY], SpeedCams[c][SCamZ], 0.0, 0.0, 10.0);
}
Let's say, MAX_SPEEDCAMS is 16 and SpeedCams has size of 15. The last call of the loop would cause an array index out of bounds for accessing element at index 15 past array upper bound 14. That was an example, there are more of those kind of code in OnGameModeInit.
So compiling with -d3 may give the line caused it and it'll be easier to find and fix it.
Re: Vehicles are not loading -
FaZeRs - 19.02.2014
FUCK YEAH I DID IT. I FIXED THAT SHIT