Vehicles are not loading
#1

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:37Server Plugins
[16:51:37] --------------
[
16:51:37]  Loading pluginmysql
[16:51:37
  > 
MySQL plugin R5 successfully loaded.
[
16:51:37]   Loaded.
[
16:51:37]  Loading pluginsocket
[16:51:37]  Socket plugin v0.1b loaded.
[
16:51:37]   Loaded.
[
16:51:37]  Loading pluginsscanf
[16:51:37
[
16:51:37]  ===============================
[
16:51:37]       sscanf plugin loaded.     
[
16:51:37]          Version:  2.8.1        
[16:51:37]    (c2012 Alex "******" Cole  
[16:51:37]  ===============================
[
16:51:37]   Loaded.
[
16:51:37]  Loading pluginstreamer
[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:37Filterscripts
[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:37onfoot_rate 40  (intread-only)
[
16:51:37incar_rate 40  (intread-only)
[
16:51:37weapon_rate 40  (intread-only)
[
16:51:38Listen server running on port 58000
[16:51:39] [LoadPoints0 points loaded.
[
16:51:39]  
[
16:51:39] -------------------------------------------
[
16:51:39Loading...
[
16:51:39City Life RolePlay copyright Jack Robertson. - 2014
[16:51:39] -------------------------------------------
[
16:51:39]  
[
16:51:39Number of vehicle models
Reply
#2

download and load plugin crashdetact
Reply
#3

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

Don't use a stolen script.
Reply
#5

It just don't loads anything. http://pastebin.com/uukXBx0B This is my OnGameModeInit
Reply
#6

And what crashdetect says

PHP код:
[00:54:51] [debugRun 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] [debugAMX 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 
Reply
#7

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.
Reply
#8

FUCK YEAH I DID IT. I FIXED THAT SHIT
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)