Only create trains with AddStaticVehicle/Ex
Du versuchst einen Zug mit CreateVehicle zu erstellen, das geht aber nicht, wie der Fehler es dir auch sagt.
Alles anzeigen[debug] Run time error 4: "Array index out of bounds"
[debug] Attempted to read/write array element at index 65535 in array of size 55
[debug] AMX backtrace:
[debug] #0 002000a0 in GetGroupName (mysqlid=7) at D:\German-Street-Life\gamemodes\gsl.pwn:31012
[debug] #1 001fd8d8 in InitPlayerGangZoneInfo (gangzone=8) at D:\German-Street-Life\gamemodes\gsl.pwn:30843
[debug] #2 0013ae9c in public OnQueryFinished (queryid=5) at D:\German-Street-Life\gamemodes\gsl.pwn:20112
Du versuchst auf ein Array mit dem Index 65535 zuzugreifen, also hast du wohl irgendwo vergessen zu checken, ob playerid == INVALID_PLAYER_ID.
Guck dir am besten mal die Funktionen an, die dort aufgelistet sind.
Alles anzeigen[debug] Run time error 4: "Array index out of bounds"
[debug] Attempted to read/write array element at negative index -1
[debug] AMX backtrace:
[debug] #0 001d01d0 in GivePlayerExp (playerid=0, Float:exp=2.00000, bool:doubleexp=true, reason[]=@006e4694 "Ticket") at D:\German-Street-Life\gamemodes\gsl.pwn:27919
[debug] #1 00216f58 in PlayerAcceptCopTicket (playerid=0) at D:\German-Street-Life\gamemodes\gsl.pwn:32546
[debug] #2 00058780 in public Itter_OnPlayerDisconnect (playerid=0, reason=2) at D:\German-Street-Life\gamemodes\gsl.pwn:5658
[debug] #3 000214b8 in ?? (0, 2) at D:\German-Street-Life\pawno\include\YSI\y_iterate.inc:909
[debug] #4 0000e40c in public SSCANF_OnPlayerDisconnect (playerid=0, reason=2) at D:\German-Street-Life\pawno\include\YSI\y_hooks/impl.inc:661
[debug] #5 000024f4 in public OnPlayerDisconnect (playerid=0, reason=2) at D:\German-Street-Life\pawno\include\sscanf2.inc:266
[debug] #6 native Kick () in samp-server.exe
[debug] #7 000549ac in public Itter_OnPlayerConnect (playerid=0) at D:\German-Street-Life\gamemodes\gsl.pwn:5414
[debug] #8 00020a58 in ?? (0) at D:\German-Street-Life\pawno\include\YSI\y_iterate.inc:646
[debug] #9 0000e278 in public SSCANF_OnPlayerConnect (playerid=0) at D:\German-Street-Life\pawno\include\YSI\y_hooks/impl.inc:618
[debug] #10 000024a8 in public OnPlayerConnect (playerid=0) at D:\German-Street-Life\pawno\include\sscanf2.inc:242
Dort ist es wieder ähnlich, irgendeine Variable hat den Wert -1 und du versuchst sie als Index in einem Array zu verwenden, das funktioniert aber nicht.
Guck dir die aufgelisteten Funktionen an und guck ob du dort irgendwo einer Variable -1 als Wert gibst, und füge einen Check dafür hinzu.
Alles anzeigenHä? @LeonMrBonnie
https://forum.sa-mp.com/showthread.php?t=642022
Sicher, dass das das richtige Include ist ?
![]()
Vehicle Synchronization
This include contains some bug fixes and new vehicle related functions.
https://github.com/RIDE-2DAY/v…aster/README.md#bug-fixesBug Fixes[/url]
- No more desynchronized vehicle colors when using -1 for the color parameters.
- Players won't collide anymore if they enter at once inside a mod shop.
- OnVehicleRespray isn't called anymore when you exit a mod shop if the colors didn't change.
- OnVehicleRespray isn't called anymore when a component is previewed inside a mod shop.
- Now the Firetruck (ladder variant) has the addsiren parameter set to true by default.
- Vehicles won't change their color to white anymore when a paintjob is removed.
- Bullbar components won't use anymore the same slots as front/rear bumpers (GetVehicleComponentInSlot).
- Now GetVehicleComponentInSlot works correctly when checking the CARMODTYPE_STEREO slot.
- Players won't crash anymore if someone tries to add an invalid component to a vehicle.
[url='https://github.com/RIDE-2DAY/vSync/blob/master/README.md#features']Features
- Now Pay 'n' Spray shops apply random colors and call OnVehicleRespray.
- Now ChangeVehicleColor applies random colors when using -1 for the color parameters.
- When using random colors, vehicles get their own colors, those used single player.
- Two new vehicle component slots: CARMODTYPE_FRONT_BULLBAR, CARMODTYPE_REAR_BULLBAR. Check "Modified Functions" in the documentation.
- Neon lights related functions (with offsets for all vehicles and Streamer support).
- New functions and callbacks (check the documentation).
Ja, das ist das richtige Include. Damit hast du dann die GetVehicleNumberPlate Funktion und das MAX_VEHICLE_NUMBER_PLATE Define.
