Problems Streamer - 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: Problems Streamer (
/showthread.php?tid=490936)
Problems Streamer -
Size - 28.01.2014
Help please.
My problem with streamer seems.
Crashdetect:
PHP код:
[28/01/2014 22:35:04] [debug] Run time error 4: "Array index out of bounds"
[28/01/2014 22:35:04] [debug] Accessing element at index 25220744 past array upper bound 4095
[28/01/2014 22:35:04] [debug] AMX backtrace:
[28/01/2014 22:35:04] [debug] #0 000ad9f8 in public Streamer_OnPlayerPickUpPickup (playerid=60, pickupid=25220744) at D:\MOD\gamemodes\new.pwn:10305
[28/01/2014 22:35:04] [debug] #1 0000b900 in public OnPlayerPickUpPickup (playerid=60, pickupid=25220744) at D:\MOD\pawno\include\streamer.inc:363
Script:
PHP код:
if(!IsPlayerInRangeOfPoint(playerid, 5.0, PickupInfo[pickupid][PickX], PickupInfo[pickupid][PickY], PickupInfo[pickupid][PickZ])) return true;
HELP Please
Re: Problems Streamer -
Syncro - 28.01.2014
You must type the MAX Array.
When you create the variable: "new PickupInfo[MAX_PICKUPS][pInfo]".
And place a #define MAX_PICKUPS 10
Re: Problems Streamer -
SerieWoordenaar - 28.01.2014
The streamer plugin can assign any ID to the pickup, it doesn't have to be zero based, other scripts can too create/remove pickups.
It would be wise to use the vector/map plugin if you want to have array[pickupid] or you will need to create an array with a defined size and an enum which contains the ID of the pickup and all the other information you want to assign to the pickup ID.