Vehicle Cant Spawn [MySql]
#1

pawn Код:
----------
Loaded log file: "server_log.txt".
----------

SA-MP Dedicated Server
----------------------
v0.3z, (C)2005-2014 SA-MP Team

[04:48:43]
[04:48:43] Server Plugins
[04:48:43] --------------
[04:48:43]  Loading plugin: mysql.dll
[04:48:43]

  > MySQL plugin R5 successfully loaded.

[04:48:43]   Loaded.
[04:48:43]  Loading plugin: audio.dll
[04:48:43]

*** Audio Plugin v0.5 R2 by Incognito loaded ***

[04:48:43]   Loaded.
[04:48:43]  Loading plugin: sscanf.dll
[04:48:43]

[04:48:43]  ===============================

[04:48:43]       sscanf plugin loaded.    

[04:48:43]    (c) 2009 Alex "******" Cole

[04:48:43]    0.3d-R2 500 Players "dnee"

[04:48:43]  ===============================

[04:48:43]   Loaded.
[04:48:43]  Loading plugin: streamer.dll
[04:48:43]

*** Streamer Plugin v2.6.1 by Incognito loaded ***

[04:48:43]   Loaded.
[04:48:43]  Loading plugin: socket.dll
[04:48:43]  Socket plugin v0.1b loaded.
[04:48:43]   Loaded.
[04:48:43]  Loading plugin: crashdetect.dll
[04:48:43]   crashdetect v4.0.2 is OK.
[04:48:43]   Loaded.
[04:48:43]  Loaded 6 plugins.

[04:48:43]
[04:48:43] Ban list
[04:48:43] --------
[04:48:43]  Loaded: samp.ban
[04:48:43]
[04:48:43]
[04:48:43] Filterscripts
[04:48:43] ---------------
[04:48:43]   Loading filterscript 'mycustom.amx'...
[04:48:44]   Loaded 1 filterscripts.

[04:48:44]  
[04:48:44]  
[04:48:44]  
[04:48:44]  =======================================
[04:48:44]  |                                     |
[04:48:44]  |        YSI version 1.06.0002        |
[04:48:44]  |        By Alex "******" Cole        |
[04:48:44]  |                                     |
[04:48:44]  =======================================
[04:48:44]  
[04:48:44]  
[04:48:44]  
[04:48:44] onfoot_rate = 40  (int, read-only)
[04:48:44] incar_rate = 40  (int, read-only)
[04:48:44] weapon_rate = 40  (int, read-only)
[04:48:46] [LoadPoints] 0 points loaded.
[04:48:46] [debug] Run time error 4: "Array index out of bounds"
[04:48:46] [debug]   Accessing element at index 15 past array upper bound 14
[04:48:46] [debug] Backtrace (most recent call first):
[04:48:46] [debug] #0  0x000d6db8()+0x2d8 from Twisted.amx
[04:48:46] [debug] #1  public SSCANF_OnGameModeInit()+0x1b34c from Twisted.amx
[04:48:46] [debug] #2  native CallLocalFunction() from samp-server.exe
[04:48:46] [debug] #3  0x00000000()+0xd7090 from Twisted.amx
[04:48:46] [debug] #4  native CallLocalFunction() from samp-server.exe
[04:48:46] [debug] #5  0xfd8d603e()+0x2801052 from Twisted.amx
[04:48:46] [debug] #6  public Itter_OnGameModeInit()+0xb4 from Twisted.amx
[04:48:46] [debug] #7  native CallLocalFunction() from samp-server.exe
[04:48:46] [debug] #8  public ScriptInit_OnGameModeInit()+0xd4a14 from Twisted.amx
[04:48:46] [debug] #9  public OnGameModeInit()+0x78 from Twisted.amx
[04:48:46]  
[04:48:46] -------------------------------------------
[04:48:46] Loading...
[04:48:46] Twisted Reality Project
[04:48:46] -------------------------------------------
[04:48:46]  
[04:48:46] Number of vehicle models: 0
[04:48:46]  
[04:48:46]  ==========================================
[04:48:46]  |                                        |
[04:48:46]  |  A new version (v3.09.0684) of YSI is  |
[04:48:46]  |            available from:             |
[04:48:46]  |                                        |
[04:48:46]  |     [url]www.y-less.com/YSI/YSI_1.0.zip[/url]     |
[04:48:46]  |                                        |
[04:48:46]  | Changelog:                             |
[04:48:46]  |                                        |
[04:48:46]  |   3.00.0000:                           |
[04:48:46]  |                                        |
[04:48:46]  |   YSI 3.0 released!  Now includes the  |
[04:48:46]  | "y_text" library for better messages,  |
[04:48:46]  | and a reworked "y_classes" library.    |
[04:48:46]  | Largely documented here                |
[04:48:46]  | "http://forum.sa-mp.com/showthread.php |
[04:48:46]  | ?t=321092"
.                            |
[04:48:46]  |                                        |
[04:48:46]  |   3.01.0002:                           |
[04:48:46]  |                                        |
[04:48:46]  |   Small fixes to "y_text" and          |
[04:48:46]  | "y_classes".                           |
[04:48:46]  |                                        |
[04:48:46]  |   3.09.0684:                           |
[04:48:46]  |                                        |
[04:48:46]  |   Reverted to old download location.   |
[04:48:46]  | Improved (and fixed) version checks;   |
[04:48:46]  | added y_bitmap, y_areas, y_races,      |
[04:48:46]  | y_zonenames, better documentation;     |
[04:48:46]  | MANY other bug fixes - see the github  |
[04:48:46]  | repository for more details:           |
[04:48:46]  |                                        |
[04:48:46]  ==========================================
[04:48:46]  
[04:48:54] --- Server Shutting Down.
after OnGameModeInit
pawn Код:
LSPDVehicles[0] = AddStaticVehicleEx(596,1602.5122,-1680.3663,5.4630,90.1200,0,1,FACTION_RESPAWN);
    LSPDVehicles[1] = AddStaticVehicleEx(596,1602.4829,-1684.0609,5.4630,90.1200,0,1,FACTION_RESPAWN);
    LSPDVehicles[2] = AddStaticVehicleEx(596,1602.5535,-1688.0438,5.4630,90.1200,0,1,FACTION_RESPAWN);
    LSPDVehicles[3] = AddStaticVehicleEx(596,1602.6227,-1692.1034,5.4630,90.1200,0,1,FACTION_RESPAWN);
    LSPDVehicles[4] = AddStaticVehicleEx(596,1602.4873,-1696.2058,5.4630,90.1200,0,1,FACTION_RESPAWN);
    LSPDVehicles[5] = AddStaticVehicleEx(596,1602.5120,-1700.2861,5.4630,90.1200,0,1,FACTION_RESPAWN);
    LSPDVehicles[6] = AddStaticVehicleEx(596,1595.6655,-1711.2139,5.4630,0.0000,0,1,FACTION_RESPAWN);
    LSPDVehicles[7] = AddStaticVehicleEx(596,1602.4758,-1704.3666,5.4630,90.0000,0,1,FACTION_RESPAWN);
    LSPDVehicles[8] = AddStaticVehicleEx(596,1591.5563,-1711.1929,5.4630,0.0000,0,1,FACTION_RESPAWN);
    LSPDVehicles[9] = AddStaticVehicleEx(596,1587.1567,-1711.0308,5.4630,0.0000,0,1,FACTION_RESPAWN);
    LSPDVehicles[10] = AddStaticVehicleEx(596,1583.3690,-1710.9269,5.4630,0.0000,0,1,FACTION_RESPAWN);
    LSPDVehicles[11] = AddStaticVehicleEx(596,1578.6202,-1711.0103,5.4630,0.0000,0,1,FACTION_RESPAWN);
    LSPDVehicles[12] = AddStaticVehicleEx(598,1574.6007,-1711.0599,5.4630,0.0000,0,1,FACTION_RESPAWN);
    LSPDVehicles[13] = AddStaticVehicleEx(598,1570.4407,-1711.0914,5.4630,0.0000,0,1,FACTION_RESPAWN);
    LSPDVehicles[14] = AddStaticVehicleEx(598,1566.0377,-1711.0865,5.4630,0.0000,0,1,FACTION_RESPAWN);
    LSPDVehicles[15] = AddStaticVehicleEx(598,1562.2946,-1711.3041,5.4630,0.0000,0,1,FACTION_RESPAWN);
    LSPDVehicles[16] = AddStaticVehicleEx(490,1558.7334,-1711.2596,5.7731,0.0000,1,1,FACTION_RESPAWN);
    LSPDVehicles[17] = AddStaticVehicleEx(599,1529.7250,-1688.2800,5.8980,270.0000,0,1,FACTION_RESPAWN);
    LSPDVehicles[18] = AddStaticVehicleEx(599,1529.6984,-1683.8052,5.8980,270.0000,0,1,FACTION_RESPAWN);
    LSPDVehicles[19] = AddStaticVehicleEx(426,1526.2618,-1644.7566,5.4943,180.0000,-1,-1,FACTION_RESPAWN);
    LSPDVehicles[20] = AddStaticVehicleEx(426,1530.6189,-1644.6954,5.4943,180.0000,-1,-1,FACTION_RESPAWN);
    LSPDVehicles[21] = AddStaticVehicleEx(421,1534.6064,-1644.5483,5.4943,180.0000,-1,-1,FACTION_RESPAWN);
    LSPDVehicles[22] = AddStaticVehicleEx(421,1538.6061,-1644.7013,5.4943,180.0000,-1,-1,FACTION_RESPAWN);
    LSPDVehicles[23] = AddStaticVehicleEx(523,1583.5237,-1680.4950,5.3747,-60.8400,0,1,FACTION_RESPAWN);
    LSPDVehicles[24] = AddStaticVehicleEx(523,1583.4276,-1677.8779,5.3747,-60.8400,0,1,FACTION_RESPAWN);
    LSPDVehicles[26] = AddStaticVehicleEx(541,1584.3937,-1671.6608,5.6028,-89.6400,0,0,FACTION_RESPAWN); // Bullet
    LSPDVehicles[27] = AddStaticVehicleEx(402,1584.2158,-1667.7837,5.6028,-89.6400,0,0,FACTION_RESPAWN); // Buffalo
    LSPDVehicles[28] = AddStaticVehicleEx(528,1543.8656,-1663.6150,6.4303,90.0000,0,1,FACTION_RESPAWN);
    LSPDVehicles[29] = AddStaticVehicleEx(528,1543.6633,-1672.0131,6.4303,90.0000,0,1,FACTION_RESPAWN);
    LSPDVehicles[30] = AddStaticVehicleEx(427,1543.5990,-1681.3265,6.4303,180.5453,0,1,FACTION_RESPAWN);
    LSPDVehicles[31] = AddStaticVehicleEx(498,1544.2075,-1656.0011,6.1636,91.7610,0,1,FACTION_RESPAWN);
    LSPDVehicles[32] = AddStaticVehicleEx(596,277.7009,-1535.2793,24.3619,235.9314,0,1,FACTION_RESPAWN);
    LSPDVehicles[33] = AddStaticVehicleEx(497,1569.6190,-1643.7563,28.6585,90.2414,0,1,FACTION_RESPAWN);
    LSPDVehicles[34] = AddStaticVehicleEx(497,1569.8668,-1657.8403,28.6585,90.2414,0,1,FACTION_RESPAWN);
    LSPDVehicles[35] = AddStaticVehicleEx(560,1558.5527,-1693.5159,5.6002,180.4668,0,0,FACTION_RESPAWN); //
    LSPDVehicles[36] = AddStaticVehicleEx(560,1562.7063,-1693.5046,5.5956,181.0911,0,0,FACTION_RESPAWN); //
rep + if you helped me
Reply
#2

The debug message clearly refers to an array with 15 slots (with valid indices 0 through 14). Seems like a classic OBOE (Off-by-One error). Check your loops to see if you mistakenly used <= instead of <.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)