debug problem
#1

pawn Код:
[22:54:09] [debug] AMX backtrace:
[22:54:09] [debug] #0 00060d00 in public OnVehicleRespray (playerid=27, vehicleid=3, color1=1, color2=1) at C:\Users\Filip\Desktop\SERVER\gamemodes\rp.pwn:8255
[22:54:09] [debug] Run time error 4: "Array index out of bounds"
[22:54:09] [debug]  Accessing element at negative index -1
[22:54:09] [debug] AMX backtrace:
[22:54:09] [debug] #0 00060d00 in public OnVehicleRespray (playerid=27, vehicleid=3, color1=1, color2=0) at C:\Users\Filip\Desktop\SERVER\gamemodes\rp.pwn:8255
[22:54:09] [debug] Run time error 4: "Array index out of bounds"
[22:54:09] [debug]  Accessing element at negative index -1
[22:54:09] [debug] AMX backtrace:
[22:54:09] [debug] #0 00060d00 in public OnVehicleRespray (playerid=27, vehicleid=3, color1=1, color2=1) at C:\Users\Filip\Desktop\SERVER\gamemodes\rp.pwn:8255
[22:54:09] [debug] Run time error 4: "Array index out of bounds"
[22:54:09] [debug]  Accessing element at negative index -1
[22:54:09] [debug] AMX backtrace:
[22:54:09] [debug] #0 00060d00 in public OnVehicleRespray (playerid=27, vehicleid=3, color1=0, color2=1) at C:\Users\Filip\Desktop\SERVER\gamemodes\rp.pwn:8255
[22:54:09] [debug] Run time error 4: "Array index out of bounds"
[22:54:09] [debug]  Accessing element at negative index -1
[22:54:09] [debug] AMX backtrace:
[22:54:09] [debug] #0 00060d00 in public OnVehicleRespray (playerid=27, vehicleid=3, color1=1, color2=1) at C:\Users\Filip\Desktop\SERVER\gamemodes\rp.pwn:8255
[22:54:09] [debug] Run time error 4: "Array index out of bounds"
[22:54:09] [debug]  Accessing element at negative index -1
[22:54:09] [debug] AMX backtrace:
[22:54:09] [debug] #0 00060d00 in public OnVehicleRespray (playerid=27, vehicleid=3, color1=1, color2=1) at C:\Users\Filip\Desktop\SERVER\gamemodes\rp.pwn:8255
[22:54:09] [debug] Run time error 4: "Array index out of bounds"
[22:54:09] [debug]  Accessing element at negative index -1
[22:54:09] [debug] AMX backtrace:
[22:54:09] [debug] #0 00060d00 in public OnVehicleRespray (playerid=27, vehicleid=3, color1=1, color2=1) at C:\Users\Filip\Desktop\SERVER\gamemodes\rp.pwn:8255
[22:54:09] [debug] Run time error 4: "Array index out of bounds"
[22:54:09] [debug]  Accessing element at negative index -1
[22:54:09] [debug] AMX backtrace:
[22:54:09] [debug] #0 00060d00 in public OnVehicleRespray (playerid=27, vehicleid=3, color1=1, color2=0) at C:\Users\Filip\Desktop\SERVER\gamemodes\rp.pwn:8255
[22:54:09] [debug] Run time error 4: "Array index out of bounds"
[22:54:09] [debug]  Accessing element at negative index -1
[22:54:09] [debug] AMX backtrace:
[22:54:09] [debug] #0 00060d00 in public OnVehicleRespray (playerid=27, vehicleid=3, color1=0, color2=0) at C:\Users\Filip\Desktop\SERVER\gamemodes\rp.pwn:8255
[22:54:09] [debug] Run time error 4: "Array index out of bounds"
[22:54:09] [debug]  Accessing element at negative index -1
[22:54:09] [debug] AMX backtrace:
[22:54:09] [debug] #0 00060d00 in public OnVehicleRespray (playerid=27, vehicleid=3, color1=0, color2=0) at C:\Users\Filip\Desktop\SERVER\gamemodes\rp.pwn:8255
[22:54:09] [debug] Run time error 4: "Array index out of bounds"
[22:54:09] [debug]  Accessing element at negative index -1
[22:54:09] [debug] AMX backtrace:
[22:54:09] [debug] #0 00060d00 in public OnVehicleRespray (playerid=27, vehicleid=3, color1=0, color2=1) at C:\Users\Filip\Desktop\SERVER\gamemodes\rp.pwn:8255
[22:54:09] [debug] Run time error 4: "Array index out of bounds"
[22:54:09] [debug]  Accessing element at negative index -1
[22:54:09] [debug] AMX backtrace:
[22:54:09] [debug] #0 00060d00 in public OnVehicleRespray (playerid=27, vehicleid=3, color1=1, color2=1) at C:\Users\Filip\Desktop\SERVER\gamemodes\rp.pwn:8255
[22:54:09] [debug] Run time error 4: "Array index out of bounds"
[22:54:09] [debug]  Accessing element at negative index -1
[22:54:09] [debug] AMX backtrace:
[22:54:09] [debug] #0 00060d00 in public OnVehicleRespray (playerid=27, vehicleid=3, color1=1, color2=0) at C:\Users\Filip\Desktop\SERVER\gamemodes\rp.pwn:8255
[22:54:10] [debug] Run time error 4: "Array index out of bounds"
[22:54:10] [debug]  Accessing element at negative index -1
[22:54:10] [debug] AMX backtrace:
[22:54:10] [debug] #0 00060d00 in public OnVehicleRespray (playerid=27, vehicleid=3, color1=17, color2=4) at C:\Users\Filip\Desktop\SERVER\gamemodes\rp.pwn:8255
[22:54:10] [debug] Run time error 4: "Array index out of bounds"
[22:54:10] [debug]  Accessing element at negative index -1
[22:54:10] [debug] AMX backtrace:
[22:54:10] [debug] #0 00060d00 in public OnVehicleRespray (playerid=27, vehicleid=3, color1=56, color2=117) at C:\Users\Filip\Desktop\SERVER\gamemodes\rp.pwn:8255
[22:54:10] [debug] Run time error 4: "Array index out of bounds"
[22:54:10] [debug]  Accessing element at negative index -1
[22:54:10] [debug] AMX backtrace:
[22:54:10] [debug] #0 00060d00 in public OnVehicleRespray (playerid=27, vehicleid=3, color1=57, color2=11) at C:\Users\Filip\Desktop\SERVER\gamemodes\rp.pwn:8255
[22:54:10] [debug] Run time error 4: "Array index out of bounds"
[22:54:10] [debug]  Accessing element at negative index -1
[22:54:10] [debug] AMX backtrace:
[22:54:10] [debug] #0 00060d00 in public OnVehicleRespray (playerid=27, vehicleid=3, color1=138, color2=137) at C:\Users\Filip\Desktop\SERVER\gamemodes\rp.pwn:8255
[22:54:10] [debug] Run time error 4: "Array index out of bounds"
[22:54:10] [debug]  Accessing element at negative index -1
[22:54:10] [debug] AMX backtrace:
[22:54:10] [debug] #0 00060d00 in public OnVehicleRespray (playerid=27, vehicleid=3, color1=80, color2=109) at C:\Users\Filip\Desktop\SERVER\gamemodes\rp.pwn:8255
[22:54:10] [debug] Run time error 4: "Array index out of bounds"
[22:54:10] [debug]  Accessing element at negative index -1
[22:54:10] [debug] AMX backtrace:
[22:54:10] [debug] #0 00060d00 in public OnVehicleRespray (playerid=27, vehicleid=3, color1=107, color2=39) at C:\Users\Filip\Desktop\SERVER\gamemodes\rp.pwn:8255
[22:54:10] [debug] Run time error 4: "Array index out of bounds"
[22:54:10] [debug]  Accessing element at negative index -1
[22:54:10] [debug] AMX backtrace:
[22:54:10] [debug] #0 00060d00 in public OnVehicleRespray (playerid=27, vehicleid=3, color1=119, color2=80) at C:\Users\Filip\Desktop\SERVER\gamemodes\rp.pwn:8255
[22:54:10] [debug] Run time error 4: "Array index out of bounds"
[22:54:10] [debug]  Accessing element at negative index -1
[22:54:10] [debug] AMX backtrace:
[22:54:10] [debug] #0 00060d00 in public OnVehicleRespray (playerid=27, vehicleid=3, color1=138, color2=158) at C:\Users\Filip\Desktop\SERVER\gamemodes\rp.pwn:8255
[22:54:10] [debug] Run time error 4: "Array index out of bounds"
[22:54:10] [debug]  Accessing element at negative index -1
[22:54:10] [debug] AMX backtrace:
[22:54:10] [debug] #0 00060d00 in public OnVehicleRespray (playerid=27, vehicleid=3, color1=170, color2=176) at C:\Users\Filip\Desktop\SERVER\gamemodes\rp.pwn:8255
[22:54:10] [debug] Run time error 4: "Array index out of bounds"
[22:54:10] [debug]  Accessing element at negative index -1
[22:54:10] [debug] AMX backtrace:
[22:54:10] [debug] #0 00060d00 in public OnVehicleRespray (playerid=27, vehicleid=3, color1=86, color2=127) at C:\Users\Filip\Desktop\SERVER\gamemodes\rp.pwn:8255
[22:54:10] [debug] Run time error 4: "Array index out of bounds"
[22:54:10] [debug]  Accessing element at negative index -1
[22:54:10] [debug] AMX backtrace:
[22:54:10] [debug] #0 00060d00 in public OnVehicleRespray (playerid=27, vehicleid=3, color1=64, color2=157) at C:\Users\Filip\Desktop\SERVER\gamemodes\rp.pwn:8255
[22:54:10] [debug] Run time error 4: "Array index out of bounds"
[22:54:10] [debug]  Accessing element at negative index -1
[22:54:10] [debug] AMX backtrace:
[22:54:10] [debug] #0 00060d00 in public OnVehicleRespray (playerid=27, vehicleid=3, color1=5, color2=69) at C:\Users\Filip\Desktop\SERVER\gamemodes\rp.pwn:8255
[22:54:10] [debug] Run time error 4: "Array index out of bounds"
[22:54:10] [debug]  Accessing element at negative index -1
[22:54:10] [debug] AMX backtrace:
[22:54:10] [debug] #0 00060d00 in public OnVehicleRespray (playerid=27, vehicleid=3, color1=65, color2=160) at C:\Users\Filip\Desktop\SERVER\gamemodes\rp.pwn:8255
[22:54:10] [debug] Run time error 4: "Array index out of bounds"
[22:54:10] [debug]  Accessing element at negative index -1
[22:54:10] [debug] AMX backtrace:
[22:54:10] [debug] #0 00060d00 in public OnVehicleRespray (playerid=27, vehicleid=3, color1=52, color2=16) at C:\Users\Filip\Desktop\SERVER\gamemodes\rp.pwn:8255
[22:54:10] [debug] Run time error 4: "Array index out of bounds"
[22:54:10] [debug]  Accessing element at negative index -1
[22:54:10] [debug] AMX backtrace:
[22:54:10] [debug] #0 00060d00 in public OnVehicleRespray (playerid=27, vehicleid=3, color1=147, color2=15) at C:\Users\Filip\Desktop\SERVER\gamemodes\rp.pwn:8255
[22:54:10] [debug] Run time error 4: "Array index out of bounds"
[22:54:10] [debug]  Accessing element at negative index -1
[22:54:10] [debug] AMX backtrace:
[22:54:10] [debug] #0 00060d00 in public OnVehicleRespray (playerid=27, vehicleid=3, color1=122, color2=52) at C:\Users\Filip\Desktop\SERVER\gamemodes\rp.pwn:8255
[22:54:10] [debug] Run time error 4: "Array index out of bounds"
[22:54:10] [debug]  Accessing element at negative index -1
[22:54:10] [debug] AMX backtrace:
[22:54:10] [debug] #0 00060d00 in public OnVehicleRespray (playerid=27, vehicleid=3, color1=30, color2=71) at C:\Users\Filip\Desktop\SERVER\gamemodes\rp.pwn:8255
[22:54:10] [debug] Run time error 4: "Array index out of bounds"
[22:54:10] [debug]  Accessing element at negative index -1
[22:54:10] [debug] AMX backtrace:
[22:54:10] [debug] #0 00060d00 in public OnVehicleRespray (playerid=27, vehicleid=3, color1=155, color2=178) at C:\Users\Filip\Desktop\SERVER\gamemodes\rp.pwn:8255
[22:54:10] [debug] Run time error 4: "Array index out of bounds"
[22:54:10] [debug]  Accessing element at negative index -1
[22:54:10] [debug] AMX backtrace:
[22:54:10] [debug] #0 00060d00 in public OnVehicleRespray (playerid=27, vehicleid=3, color1=116, color2=146) at C:\Users\Filip\Desktop\SERVER\gamemodes\rp.pwn:8255
[22:54:10] [debug] Run time error 4: "Array index out of bounds"
[22:54:10] [debug]  Accessing element at negative index -1
[22:54:10] [debug] AMX backtrace:
[22:54:10] [debug] #0 00060d00 in public OnVehicleRespray (playerid=27, vehicleid=3, color1=76, color2=95) at C:\Users\Filip\Desktop\SERVER\gamemodes\rp.pwn:8255
[22:54:10] [debug] Run time error 4: "Array index out of bounds"
[22:54:10] [debug]  Accessing element at negative index -1
[22:54:10] [debug] AMX backtrace:
[22:54:10] [debug] #0 00060d00 in public OnVehicleRespray (playerid=27, vehicleid=3, color1=58, color2=51) at C:\Users\Filip\Desktop\SERVER\gamemodes\rp.pwn:8255
[22:54:10] [debug] Run time error 4: "Array index out of bounds"
[22:54:10] [debug]  Accessing element at negative index -1
[22:54:10] [debug] AMX backtrace:
[22:54:10] [debug] #0 00060d00 in public OnVehicleRespray (playerid=27, vehicleid=3, color1=121, color2=2) at C:\Users\Filip\Desktop\SERVER\gamemodes\rp.pwn:8255
[22:54:10] [debug] Run time error 4: "Array index out of bounds"
[22:54:10] [debug]  Accessing element at negative index -1
[22:54:10] [debug] AMX backtrace:
[22:54:10] [debug] #0 00060d00 in public OnVehicleRespray (playerid=27, vehicleid=3, color1=90, color2=148) at C:\Users\Filip\Desktop\SERVER\gamemodes\rp.pwn:8255
[22:54:10] [debug] Run time error 4: "Array index out of bounds"
[22:54:10] [debug]  Accessing element at negative index -1
[22:54:10] [debug] AMX backtrace:
[22:54:10] [debug] #0 00060d00 in public OnVehicleRespray (playerid=27, vehicleid=3, color1=4, color2=130) at C:\Users\Filip\Desktop\SERVER\gamemodes\rp.pwn:8255
[22:54:10] [debug] Run time error 4: "Array index out of bounds"
[22:54:10] [debug]  Accessing element at negative index -1
[22:54:10] [debug] AMX backtrace:
[22:54:10] [debug] #0 00060d00 in public OnVehicleRespray (playerid=27, vehicleid=3, color1=134, color2=121) at C:\Users\Filip\Desktop\SERVER\gamemodes\rp.pwn:8255
[22:54:10] [debug] Run time error 4: "Array index out of bounds"
[22:54:10] [debug]  Accessing element at negative index -1
[22:54:10] [debug] AMX backtrace:
[22:54:10] [debug] #0 00060d00 in public OnVehicleRespray (playerid=27, vehicleid=3, color1=36, color2=102) at C:\Users\Filip\Desktop\SERVER\gamemodes\rp.pwn:8255
[22:54:10] [debug] Run time error 4: "Array index out of bounds"
[22:54:10] [debug]  Accessing element at negative index -1
[22:54:10] [debug] AMX backtrace:
[22:54:10] [debug] #0 00060d00 in public OnVehicleRespray (playerid=27, vehicleid=3, color1=105, color2=53) at C:\Users\Filip\Desktop\SERVER\gamemodes\rp.pwn:8255
[22:54:10] [debug] Run time error 4: "Array index out of bounds"
[22:54:10] [debug]  Accessing element at negative index -1
[22:54:10] [debug] AMX backtrace:
[22:54:10] [debug] #0 00060d00 in public OnVehicleRespray (playerid=27, vehicleid=3, color1=125, color2=92) at C:\Users\Filip\Desktop\SERVER\gamemodes\rp.pwn:8255
[22:54:10] [debug] Run time error 4: "Array index out of bounds"
[22:54:10] [debug]  Accessing element at negative index -1
[22:54:10] [debug] AMX backtrace:
[22:54:10] [debug] #0 00060d00 in public OnVehicleRespray (playerid=27, vehicleid=3, color1=16, color2=3) at C:\Users\Filip\Desktop\SERVER\gamemodes\rp.pwn:8255
[22:54:10] [debug] Run time error 4: "Array index out of bounds"
[22:54:10] [debug]  Accessing element at negative index -1
[22:54:10] [debug] AMX backtrace:
[22:54:10] [debug] #0 00060d00 in public OnVehicleRespray (playerid=27, vehicleid=3, color1=144, color2=57) at C:\Users\Filip\Desktop\SERVER\gamemodes\rp.pwn:8255
[22:54:10] [debug] Run time error 4: "Array index out of bounds"
[22:54:10] [debug]  Accessing element at negative index -1
[22:54:10] [debug] AMX backtrace:
[22:54:10] [debug] #0 00060d00 in public OnVehicleRespray (playerid=27, vehicleid=3, color1=120, color2=93) at C:\Users\Filip\Desktop\SERVER\gamemodes\rp.pwn:8255
[22:54:10] [debug] Run time error 4: "Array index out of bounds"
[22:54:10] [debug]  Accessing element at negative index -1
[22:54:10] [debug] AMX backtrace:
[22:54:10] [debug] #0 00060d00 in public OnVehicleRespray (playerid=27, vehicleid=3, color1=46, color2=143) at C:\Users\Filip\Desktop\SERVER\gamemodes\rp.pwn:8255
[22:54:10] [debug] Run time error 4: "Array index out of bounds"
[22:54:10] [debug]  Accessing element at negative index -1
[22:54:10] [debug] AMX backtrace:
[22:54:10] [debug] #0 00060d00 in public OnVehicleRespray (playerid=27, vehicleid=3, color1=97, color2=182) at C:\Users\Filip\Desktop\SERVER\gamemodes\rp.pwn:8255
[22:54:10] [debug] Run time error 4: "Array index out of bounds"
[22:54:10] [debug]  Accessing element at negative index -1
[22:54:10] [debug] AMX backtrace:
[22:54:10] [debug] #0 00060d00 in public OnVehicleRespray (playerid=27, vehicleid=3, color1=91, color2=170) at C:\Users\Filip\Desktop\SERVER\gamemodes\rp.pwn:8255
[22:54:10] [debug] Run time error 4: "Array index out of bounds"
[22:54:10] [debug]  Accessing element at negative index -1
[22:54:10] [debug] AMX backtrace:
[22:54:10] [debug] #0 00060d00 in public OnVehicleRespray (playerid=27, vehicleid=3, color1=118, color2=6) at C:\Users\Filip\Desktop\SERVER\gamemodes\rp.pwn:8255
[22:54:10] [debug] Run time error 4: "Array index out of bounds"
[22:54:10] [debug]  Accessing element at negative index -1
[22:54:10] [debug] AMX backtrace:
[22:54:10] [debug] #0 00060d00 in public OnVehicleRespray (playerid=27, vehicleid=3, color1=61, color2=122) at C:\Users\Filip\Desktop\SERVER\gamemodes\rp.pwn:8255
[22:54:10] [debug] Run time error 4: "Array index out of bounds"
[22:54:10] [debug]  Accessing element at negative index -1
[22:54:10] [debug] AMX backtrace:
[22:54:10] [debug] #0 00060d00 in public OnVehicleRespray (playerid=27, vehicleid=3, color1=145, color2=16) at C:\Users\Filip\Desktop\SERVER\gamemodes\rp.pwn:8255
[22:54:10] [debug] Run time error 4: "Array index out of bounds"
[22:54:10] [debug]  Accessing element at negative index -1
[22:54:10] [debug] AMX backtrace:
[22:54:10] [debug] #0 00060d00 in public OnVehicleRespray (playerid=27, vehicleid=3, color1=64, color2=104) at C:\Users\Filip\Desktop\SERVER\gamemodes\rp.pwn:8255
[22:54:10] [debug] Run time error 4: "Array index out of bounds"
[22:54:10] [debug]  Accessing element at negative index -1
[22:54:10] [debug] AMX backtrace:
[22:54:10] [debug] #0 00060d00 in public OnVehicleRespray (playerid=27, vehicleid=3, color1=44, color2=63) at C:\Users\Filip\Desktop\SERVER\gamemodes\rp.pwn:8255
[22:54:11] [chat] [Juan_Rojas]: Pe gratis?
[22:54:11] [debug] Run time error 4: "Array index out of bounds"
[22:54:11] [debug]  Accessing element at negative index -1
[22:54:11] [debug] AMX backtrace:
[22:54:11] [debug] #0 00060d00 in public OnVehicleRespray (playerid=27, vehicleid=3, color1=21, color2=176) at C:\Users\Filip\Desktop\SERVER\gamemodes\rp.pwn:8255
[22:54:11] [debug] Run time error 4: "Array index out of bounds"
[22:54:11] [debug]  Accessing element at negative index -1
[22:54:11] [debug] AMX backtrace:
[22:54:11] [debug] #0 00060d00 in public OnVehicleRespray (playerid=27, vehicleid=3, color1=171, color2=147) at C:\Users\Filip\Desktop\SERVER\gamemodes\rp.pwn:8255
[22:54:11] [debug] Run time error 4: "Array index out of bounds"
[22:54:11] [debug]  Accessing element at negative index -1
[22:54:11] [debug] AMX backtrace:
[22:54:11] [debug] #0 00060d00 in public OnVehicleRespray (playerid=27, vehicleid=3, color1=105, color2=50) at C:\Users\Filip\Desktop\SERVER\gamemodes\rp.pwn:8255
[22:54:11] [debug] Run time error 4: "Array index out of bounds"
[22:54:11] [debug]  Accessing element at negative index -1
[22:54:11] [debug] AMX backtrace:
[22:54:11] [debug] #0 00060d00 in public OnVehicleRespray (playerid=27, vehicleid=3, color1=70, color2=166) at C:\Users\Filip\Desktop\SERVER\gamemodes\rp.pwn:8255
[22:54:11] [debug] Run time error 4: "Array index out of bounds"
[22:54:11] [debug]  Accessing element at negative index -1
[22:54:11] [debug] AMX backtrace:
[22:54:11] [debug] #0 00060d00 in public OnVehicleRespray (playerid=27, vehicleid=3, color1=96, color2=67) at C:\Users\Filip\Desktop\SERVER\gamemodes\rp.pwn:8255
[22:54:11] [debug] Run time error 4: "Array index out of bounds"
[22:54:11] [debug]  Accessing element at negative index -1
[22:54:11] [debug] AMX backtrace:
[22:54:11] [debug] #0 00060d00 in public OnVehicleRespray (playerid=27, vehicleid=3, color1=131, color2=115) at C:\Users\Filip\Desktop\SERVER\gamemodes\rp.pwn:8255
[22:54:11] [debug] Run time error 4: "Array index out of bounds"
[22:54:11] [debug]  Accessing element at negative index -1
[22:54:11] [debug] AMX backtrace:
[22:54:11] [debug] #0 00060d00 in public OnVehicleRespray (playerid=27, vehicleid=3, color1=109, color2=43) at C:\Users\Filip\Desktop\SERVER\gamemodes\rp.pwn:8255
[22:54:11] [debug] Run time error 4: "Array index out of bounds"
[22:54:11] [debug]  Accessing element at negative index -1
[22:54:11] [debug] AMX backtrace:
[22:54:11] [debug] #0 00060d00 in public OnVehicleRespray (playerid=27, vehicleid=3, color1=57, color2=102) at C:\Users\Filip\Desktop\SERVER\gamemodes\rp.pwn:8255
[22:54:11] [debug] Run time error 4: "Array index out of bounds"
[22:54:11] [debug]  Accessing element at negative index -1
[22:54:11] [debug] AMX backtrace:
[22:54:11] [debug] #0 00060d00 in public OnVehicleRespray (playerid=27, vehicleid=3, color1=182, color2=172) at C:\Users\Filip\Desktop\SERVER\gamemodes\rp.pwn:8255
[22:54:11] [debug] Run time error 4: "Array index out of bounds"
[22:54:11] [debug]  Accessing element at negative index -1
[22:54:11] [debug] AMX backtrace:
[22:54:11] [debug] #0 00060d00 in public OnVehicleRespray (playerid=27, vehicleid=3, color1=106, color2=43) at C:\Users\Filip\Desktop\SERVER\gamemodes\rp.pwn:8255
[22:54:11] [debug] Run time error 4: "Array index out of bounds"
[22:54:11] [debug]  Accessing element at negative index -1
[22:54:11] [debug] AMX backtrace:
[22:54:11] [debug] #0 00060d00 in public OnVehicleRespray (playerid=27, vehicleid=3, color1=24, color2=108) at C:\Users\Filip\Desktop\SERVER\gamemodes\rp.pwn:8255
[22:54:11] [debug] Run time error 4: "Array index out of bounds"
[22:54:11] [debug]  Accessing element at negative index -1
[22:54:11] [debug] AMX backtrace:
[22:54:11] [debug] #0 00060d00 in public OnVehicleRespray (playerid=27, vehicleid=3, color1=92, color2=131) at C:\Users\Filip\Desktop\SERVER\gamemodes\rp.pwn:8255
[22:54:11] [debug] Run time error 4: "Array index out of bounds"
[22:54:11] [debug]  Accessing element at negative index -1
[22:54:11] [debug] AMX backtrace:
[22:54:11] [debug] #0 00060d00 in public OnVehicleRespray (playerid=27, vehicleid=3, color1=43, color2=20) at C:\Users\Filip\Desktop\SERVER\gamemodes\rp.pwn:8255
[22:54:11] [debug] Run time error 4: "Array index out of bounds"
[22:54:11] [debug]  Accessing element at negative index -1
[22:54:11] [debug] AMX backtrace:
[22:54:11] [debug] #0 00060d00 in public OnVehicleRespray (playerid=27, vehicleid=3, color1=48, color2=94) at C:\Users\Filip\Desktop\SERVER\gamemodes\rp.pwn:8255

pawn Код:
public OnVehicleRespray(playerid, vehicleid, color1, color2)
{
    new slot = GetVehicleSlot(vehicleid);
//8255line  VehicleInfo[slot][vColor1] = color1;
    VehicleInfo[slot][vColor2] = color2;
    new str[128];
    new totalc;
    totalc = GetPVarInt(playerid, "OVR") + 1;

    SetPVarInt(playerid, "OVR", totalc);

    new Float:vpox[3];
    if (totalc > normal_ovr_count)
    {
        GetVehiclePos(vehicleid, vpox[0], vpox[1], vpox[2]);
        //new insprayshop = point_in_sprayshop(Vx, Vy, Vz);
        if (!IsPlayerInRangeOfPoint(playerid, 20.0, 616.7820, -74.8151, 997.6350))
        {
            if (GetPlayerVirtualWorld(playerid) != VW_CHEATER)
            {
                format(str,sizeof(str), "[alot_ovr_inline] %s %d %d (%0.4f %0.4f %0.4f)", GetPlayerNameEx(playerid), playerid, totalc, vpox[0], vpox[1], vpox[2]);
                SendAdminBroadcast(str);
            }
        }
        else if (!IsPlayerInRangeOfPoint(playerid, 20.0, 615.2851, -124.2390, 997.6350))
        {
            if (GetPlayerVirtualWorld(playerid) != VW_CHEATER)
            {
                format(str,sizeof(str), "[alot_ovr_inline] %s %d %d (%0.4f %0.4f %0.4f)", GetPlayerNameEx(playerid), playerid, totalc, vpox[0], vpox[1], vpox[2]);
                SendAdminBroadcast(str);
            }
        }
        else if (!IsPlayerInRangeOfPoint(playerid, 20.0, 617.5380, -1.9900, 1000.6829))
        {
            if (GetPlayerVirtualWorld(playerid) != VW_CHEATER)
            {
                format(str,sizeof(str), "[alot_ovr_inline] %s %d %d (%0.4f %0.4f %0.4f)", GetPlayerNameEx(playerid), playerid, totalc, vpox[0], vpox[1], vpox[2]);
                SendAdminBroadcast(str);
            }
        }
    }
    if (totalc > 5)
    {
        if (GetPlayerVirtualWorld(playerid) != VW_CHEATER)
        {
            SendClientMessage(playerid, COLOR_LIGHTRED, "Quick color changer cleo is a bad idea here.");
            SetTimerEx("KickPublic", 1000, 0, "d", playerid);
            Kick(playerid);
           
        }
    }

    if (GetPlayerVirtualWorld(playerid) == VW_CHEATER) // already taken care of.
    return 1;

    if (!IsPlayerInVehicle(playerid, vehicleid))
    {

        new Float:pox[3];
        GetPlayerPos(playerid, pox[0], pox[1], pox[2]);
        GetVehiclePos(vehicleid, vpox[0], vpox[1], vpox[2]);

        format(str,sizeof(str), "[OVR_INVALID] %s %d %d %d %d Player (%0.4f %0.4f %0.4f) Car (%0.4f %0.4f %0.4f)", GetPlayerNameEx(playerid), playerid, vehicleid, color1, color2, pox[0], pox[1], pox[2], vpox[0], vpox[1], vpox[2]);
        SendAdminBroadcast(str);
        Kick(playerid);
    }
    return 1;
}
Reply
#2

pawn Код:
new slot = GetVehicleSlot(vehicleid);
GetVehicleSlot returned -1, therebefore slot is -1. Then it passed slot (-1) in VehicleInfo.

You can check if slot is not -1 and continue to prevent it but it will not called at all. Would you mind to show us GetVehicleSlot so we can see why it returned -1 and not the correct slot?
Reply
#3

like this ?


pawn Код:
public OnVehicleRespray(playerid, vehicleid, color1, color2)
{
    new slot = GetVehicleSlot(vehicleid);
    if(slot > -1)
    {
        VehicleInfo[slot][vColor1] = color1;
        VehicleInfo[slot][vColor2] = color2;
        new str[128];
        new totalc;
        totalc = GetPVarInt(playerid, "OVR") + 1;

        SetPVarInt(playerid, "OVR", totalc);

        new Float:vpox[3];
        if (totalc > normal_ovr_count)
        {
            GetVehiclePos(vehicleid, vpox[0], vpox[1], vpox[2]);
            //new insprayshop = point_in_sprayshop(Vx, Vy, Vz);
            if (!IsPlayerInRangeOfPoint(playerid, 20.0, 616.7820, -74.8151, 997.6350))
            {
                if (GetPlayerVirtualWorld(playerid) != VW_CHEATER)
                {
                    format(str,sizeof(str), "[alot_ovr_inline] %s %d %d (%0.4f %0.4f %0.4f)", GetPlayerNameEx(playerid), playerid, totalc, vpox[0], vpox[1], vpox[2]);
                    SendAdminBroadcast(str);
                }
            }
            else if (!IsPlayerInRangeOfPoint(playerid, 20.0, 615.2851, -124.2390, 997.6350))
            {
                if (GetPlayerVirtualWorld(playerid) != VW_CHEATER)
                {
                    format(str,sizeof(str), "[alot_ovr_inline] %s %d %d (%0.4f %0.4f %0.4f)", GetPlayerNameEx(playerid), playerid, totalc, vpox[0], vpox[1], vpox[2]);
                    SendAdminBroadcast(str);
                }
            }
            else if (!IsPlayerInRangeOfPoint(playerid, 20.0, 617.5380, -1.9900, 1000.6829))
            {
                if (GetPlayerVirtualWorld(playerid) != VW_CHEATER)
                {
                    format(str,sizeof(str), "[alot_ovr_inline] %s %d %d (%0.4f %0.4f %0.4f)", GetPlayerNameEx(playerid), playerid, totalc, vpox[0], vpox[1], vpox[2]);
                    SendAdminBroadcast(str);
                }
            }
        }
        if (totalc > 5)
        {
            if (GetPlayerVirtualWorld(playerid) != VW_CHEATER)
            {
                SendClientMessage(playerid, COLOR_LIGHTRED, "Quick color changer cleo is a bad idea here.");
                SetTimerEx("KickPublic", 1000, 0, "d", playerid);
                Kick(playerid);

            }
        }

        if (GetPlayerVirtualWorld(playerid) == VW_CHEATER) // already taken care of.
        return 1;

        if (!IsPlayerInVehicle(playerid, vehicleid))
        {

            new Float:pox[3];
            GetPlayerPos(playerid, pox[0], pox[1], pox[2]);
            GetVehiclePos(vehicleid, vpox[0], vpox[1], vpox[2]);

            format(str,sizeof(str), "[OVR_INVALID] %s %d %d %d %d Player (%0.4f %0.4f %0.4f) Car (%0.4f %0.4f %0.4f)", GetPlayerNameEx(playerid), playerid, vehicleid, color1, color2, pox[0], pox[1], pox[2], vpox[0], vpox[1], vpox[2]);
            SendAdminBroadcast(str);
            Kick(playerid);
        }
    }
    return 1;
}
Reply
#4

Only the part slot is used in VehicleInfo. The rest of the code has nothing to do with it.

pawn Код:
public OnVehicleRespray(playerid, vehicleid, color1, color2)
{
    new slot = GetVehicleSlot(vehicleid);
    if(slot != -1)
    {
        VehicleInfo[slot][vColor1] = color1;
        VehicleInfo[slot][vColor2] = color2;
    }
    new str[128];
    new totalc;
    totalc = GetPVarInt(playerid, "OVR") + 1;
   
    SetPVarInt(playerid, "OVR", totalc);
   
    new Float:vpox[3];
    if (totalc > normal_ovr_count)
    {
        GetVehiclePos(vehicleid, vpox[0], vpox[1], vpox[2]);
        //new insprayshop = point_in_sprayshop(Vx, Vy, Vz);
        if (!IsPlayerInRangeOfPoint(playerid, 20.0, 616.7820, -74.8151, 997.6350))
        {
            if (GetPlayerVirtualWorld(playerid) != VW_CHEATER)
            {
                format(str,sizeof(str), "[alot_ovr_inline] %s %d %d (%0.4f %0.4f %0.4f)", GetPlayerNameEx(playerid), playerid, totalc, vpox[0], vpox[1], vpox[2]);
                SendAdminBroadcast(str);
            }
        }
        else if (!IsPlayerInRangeOfPoint(playerid, 20.0, 615.2851, -124.2390, 997.6350))
        {
            if (GetPlayerVirtualWorld(playerid) != VW_CHEATER)
            {
                format(str,sizeof(str), "[alot_ovr_inline] %s %d %d (%0.4f %0.4f %0.4f)", GetPlayerNameEx(playerid), playerid, totalc, vpox[0], vpox[1], vpox[2]);
                SendAdminBroadcast(str);
            }
        }
        else if (!IsPlayerInRangeOfPoint(playerid, 20.0, 617.5380, -1.9900, 1000.6829))
        {
            if (GetPlayerVirtualWorld(playerid) != VW_CHEATER)
            {
                format(str,sizeof(str), "[alot_ovr_inline] %s %d %d (%0.4f %0.4f %0.4f)", GetPlayerNameEx(playerid), playerid, totalc, vpox[0], vpox[1], vpox[2]);
                SendAdminBroadcast(str);
            }
        }
    }
    if (totalc > 5)
    {
        if (GetPlayerVirtualWorld(playerid) != VW_CHEATER)
        {
            SendClientMessage(playerid, COLOR_LIGHTRED, "Quick color changer cleo is a bad idea here.");
            SetTimerEx("KickPublic", 1000, 0, "d", playerid);
            Kick(playerid);
           
        }
    }
   
    if (GetPlayerVirtualWorld(playerid) == VW_CHEATER) // already taken care of.
    return 1;
   
    if (!IsPlayerInVehicle(playerid, vehicleid))
    {
       
        new Float:pox[3];
        GetPlayerPos(playerid, pox[0], pox[1], pox[2]);
        GetVehiclePos(vehicleid, vpox[0], vpox[1], vpox[2]);
       
        format(str,sizeof(str), "[OVR_INVALID] %s %d %d %d %d Player (%0.4f %0.4f %0.4f) Car (%0.4f %0.4f %0.4f)", GetPlayerNameEx(playerid), playerid, vehicleid, color1, color2, pox[0], pox[1], pox[2], vpox[0], vpox[1], vpox[2]);
        SendAdminBroadcast(str);
        Kick(playerid);
    }
    return 1;
}
However, if GetVehicleSlot returns -1 all the time then it will never store the color 1 and 2 into VehicleInfo. The function might be wrong.
Reply
#5

pawn Код:
[10:26:03] [debug] Run time error 4: "Array index out of bounds"
[10:26:03] [debug]  Accessing element at negative index -1
[10:26:03] [debug] AMX backtrace:
[10:26:03] [debug] #0 0015d2b8 in public cmd_stats (playerid=10, params[]=@0x00d98578 "") at C:\AMD\GMBUN\rp.pwn:36169
[10:26:03] [debug] #1 00007f18 in public OnPlayerCommandText (playerid=10, cmdtext[]=@0x00d9855c "/stats") at C:\Users\Filip\Desktop\SERVER\pawno\include\zcmd.inc:104
Command resolved
pawn Код:
COMMAND:stats(playerid,params[])
{

    if(character_chosen[playerid])
    {

        if(active_character[playerid] != -1)
        {
            new str[256];
            new tmp[32];
            new tmp2[32];
            new tmp3[32];
            new name[MAX_PLAYER_NAME];
            new facslot = GetFactionSlot(CharacterInfo[playerid][active_character[playerid]][cFaction]);
            GetCharacterName(playerid,name);
            format(str,sizeof(str),"*%s*",name);
            SendClientMessage(playerid,COLOR_GREEN,str);
            if(CharacterInfo[playerid][active_character[playerid]][cCarLic]) { format(tmp,sizeof(tmp),"Da"); } else { format(tmp,sizeof(tmp),"Nu"); }
            if(CharacterInfo[playerid][active_character[playerid]][cWepLic]) { format(tmp2,sizeof(tmp2),"Da"); } else { format(tmp2,sizeof(tmp2),"Nu"); }
            format(str,sizeof(str),"Bani:[$%d] Banca:[$%d] Permis:[%s] Permis Port-Arma:[%s]",CharacterInfo[playerid][active_character[playerid]][cMoney],CharacterInfo[playerid][active_character[playerid]][cBank],tmp,tmp2);
            SendClientMessage(playerid,COLOR_WHITE,str);
            if(!CharacterInfo[playerid][active_character[playerid]][cFaction]) { format(tmp,sizeof(tmp),"Fara"); } else { new slot = GetFactionSlot(CharacterInfo[playerid][active_character[playerid]][cFaction]); format(tmp,sizeof(tmp),"%s",FactionInfo[slot][fName]); }
            if(!CharacterInfo[playerid][active_character[playerid]][cFaction]) { format(tmp,sizeof(tmp),"Fara"); } else { format(tmp,sizeof(tmp),"%s",FactionInfo[facslot][fName]); }
            if(!mask[playerid]) { format(tmp3,sizeof(tmp3),"Nu"); } else { format(tmp3,sizeof(tmp3),"Da"); }
            format(str,sizeof(str),"Factiune:[%s] Rank:[%s] Numar Telefon:[%d] Masca:[%s]",tmp,tmp2,CharacterInfo[playerid][active_character[playerid]][cPhone],tmp3);
            SendClientMessage(playerid,COLOR_WHITE,str);
            if(!HasItem(INVENTORY_TYPE_PLAYER,playerid,INVENTORY_RADIO,1)) { format(tmp,sizeof(tmp),"Nu"); } else { format(tmp,sizeof(tmp),"Da"); }
            new jname[256];
            GetJobName(CharacterInfo[playerid][active_character[playerid]][cJob],jname);
            new jcooldown = (CharacterInfo[playerid][active_character[playerid]][cJobCooldown] / 60);
            format(str,sizeof(str),"Radio:[%s] Frecventa:[%d] Economii:[$%d] Job:[%s] Noul Job:[%d mins]",tmp,CharacterInfo[playerid][active_character[playerid]][cRadioChannel],CharacterInfo[playerid][active_character[playerid]][cSavings],jname,jcooldown);
            SendClientMessage(playerid,COLOR_WHITE,str);
            if(CharacterInfo[playerid][active_character[playerid]][cPayTime] > 60)
            {
                format(tmp,sizeof(tmp),"%d minute",(CharacterInfo[playerid][active_character[playerid]][cPayTime] / 60));
            }
            else
            {
                format(tmp,sizeof(tmp),"Imediat...");
            }
            if(CharacterInfo[playerid][active_character[playerid]][cHealthInsurance]) { format(tmp3,sizeof(tmp3),"Da"); } else { format(tmp3,sizeof(tmp3),"Nu"); }
            format(str,sizeof(str),"Nivel:[%d] Exp:[%d/%d] Payday:[%s] Salariu:[$%d] Decese:[%d]  Asigurari:[%s]",CharacterInfo[playerid][active_character[playerid]][cLevel],CharacterInfo[playerid][active_character[playerid]][cExp],(8 * CharacterInfo[playerid][active_character[playerid]][cLevel]),tmp,(CharacterInfo[playerid][active_character[playerid]][cPayday] + 1000),CharacterInfo[playerid][active_character[playerid]][cDeaths],tmp3);
            SendClientMessage(playerid,COLOR_WHITE,str);
            if(dice[playerid]) { format(tmp,sizeof(tmp),"Da"); } else { format(tmp,sizeof(tmp),"Nu"); }
            if(gps[playerid]) { format(tmp2,sizeof(tmp2),"Da"); } else { format(tmp2,sizeof(tmp2),"Nu"); }
            if(rope[playerid]) { format(tmp3,sizeof(tmp3),"Da"); } else { format(tmp3,sizeof(tmp3),"Nu"); }
            new cname[64];
            if(CharacterInfo[playerid][active_character[playerid]][cCompany] > 0)
            {

                new cslot = FetchCompanySlot(CharacterInfo[playerid][active_character[playerid]][cCompany]);
                format(cname,sizeof(cname),"%s",CompanyInfo[cslot][ciName]);

            }
            else { format(cname,sizeof(cname),"Fara"); }
            new lang[64];
            FetchLanguageName(CharacterInfo[playerid][active_character[playerid]][cLanguage],lang);
            format(str,sizeof(str),"Zar:[%s] GPS:[%s] Franghie:[%s] Companie:[%s] Limba:[%s]",tmp,tmp2,tmp3,cname,lang);
            SendClientMessage(playerid,COLOR_WHITE,str);
            new skill_name[128];
            GetSkillName(skill_name,CharacterInfo[playerid][active_character[playerid]][cSkill]);
            format(str,sizeof(str),"Skill:[%s] Nivel skill:[%d]",skill_name,CharacterInfo[playerid][active_character[playerid]][cSkillLevel]);
            SendClientMessage(playerid,COLOR_WHITE,str);
            return 1;
        }
    }
    else
    {

        SendClientMessage(playerid,COLOR_GREY,"Te rog alege caracterul intai.");
        return 1;

    }

}

------------------------------------------------
pawn Код:
[18:30:47] [debug] Run time error 4: "Array index out of bounds"
[18:30:47] [debug]  Accessing element at index 111 past array upper bound 59
[18:30:47] [debug] AMX backtrace:
[18:30:47] [debug] #0 000597b0 in public OnPlayerText (playerid=48, text[]=@0x00d9855c "500") at C:\AMD\GMBUN\rp.pwn:7386

[18:31:01] [debug] Run time error 4: "Array index out of bounds"
[18:31:01] [debug]  Accessing element at index 70 past array upper bound 59
[18:31:01] [debug] AMX backtrace:
[18:31:01] [debug] #0 000597b0 in public OnPlayerText (playerid=48, text[]=@0x00d9855c "4000") at C:\AMD\GMBUN\rp.pwn:7386

[18:31:13] [debug] Run time error 4: "Array index out of bounds"
[18:31:13] [debug]  Accessing element at index 111 past array upper bound 59
[18:31:13] [debug] AMX backtrace:
[18:31:13] [debug] #0 000597b0 in public OnPlayerText (playerid=48, text[]=@0x00d9855c "iar e bug") at C:\AMD\GMBUN\rp.pwn:7386


[18:31:23] [debug] Run time error 4: "Array index out of bounds"
[18:31:23] [debug]  Accessing element at index 111 past array upper bound 59
[18:31:23] [debug] AMX backtrace:
[18:31:23] [debug] #0 000597b0 in public OnPlayerText (playerid=48, text[]=@0x00d9855c "500") at C:\AMD\GMBUN\rp.pwn:7386
resolved

pawn Код:
if(-1 < biz_editingentrance[playerid] < MAX_BIZES )
        {

            new amount = strval(text);
            if(amount < 0 || amount > 100000) { SendClientMessage(playerid,COLOR_LIGHTRED,"Pretul intrari nu poate fi mai mic de $0 si mai mare de $100000"); return 0; }
            BizInfo[biz_editingentrance[playerid]][bEntranceFee] = amount;
            new str[128];
            format(str,sizeof(str),"Ai setat pretul de intrare la $%d",amount);
            SendClientMessage(playerid,COLOR_GREEN,str);
            TogglePlayerControllable(playerid,1);
            new biz = biz_editingentrance[playerid];
            new str2[128];
            format(str2,sizeof(str),"Informatii Afacere\n%s\n\nPret Intrare: $%d\nFoloseste /enter pentru a intra",BizInfo[biz][bName],BizInfo[biz][bEntranceFee]);
//string set from 64 to 128         Update3DTextLabelText(BizInfo[biz][bPickup],COLOR_LIGHTBLUE,str2);
            biz_editingentrance[playerid] = -1;
            return 0;

        }
--------------------------------------------
pawn Код:
[02:51:06] [debug] Run time error 4: "Array index out of bounds"
[02:51:06] [debug]  Accessing element at negative index -1
[02:51:06] [debug] AMX backtrace:
[02:51:06] [debug] #0 001d6888 in cl_RemovePlayerFromDressingRoom (playerid=1) at C:\AMD\GMBUN\rp.pwn:51572
[02:51:06] [debug] #1 0006b244 in public OnDialogResponse (playerid=1, dialogid=44, response=0, listitem=0, inputtext[]=@0x00d9855c "Masti") at C:\AMD\GMBUN\rp.pwn:9895
stock resolved

pawn Код:
stock cl_RemovePlayerFromDressingRoom(playerid)
{
     if(active_character[playerid] != -1)
    {
        new biz = in_biz[playerid];
        SetPlayerPos(playerid,BizInfo[biz][bInteriorX],BizInfo[biz][bInteriorY],BizInfo[biz][bInteriorZ]);
        SetPlayerInterior(playerid,BizInfo[biz][bInterior]);
        SetPlayerVirtualWorld(playerid,(biz + 2000));
        SetCameraBehindPlayer(playerid);
        TogglePlayerControllable(playerid,1);
    }
}

It's ok ?
Reply
#6

In the cl_RemovePlayerFromDressingRoom, you don't have any active_character. The one it crashes is:
pawn Код:
new biz = in_biz[playerid];
because biz is -1 and you use it in BizInfo. So check if the biz is not -1 instead.
Reply
#7

pawn Код:
if(biz != -1)
{
}
? for cl_removeclothes?

and the rest of debugs it's ok ?
Reply
#8

pawn Код:
[19:49:40] [debug] Run time error 4: "Array index out of bounds"
[19:49:40] [debug]  Accessing element at negative index -1
[19:49:40] [debug] AMX backtrace:
[19:49:40] [debug] #0 000b5434 in public GetFactionName (factionid=20, name[]=@0x00dc8910 "") at C:\AMD\GMBUN\rp.pwn:17596
[19:49:40] [debug] #1 0014ca2c in public cmd_invite (playerid=3, params[]=@0x00d98588 "45") at C:\AMD\GMBUN\rp.pwn:34294
[19:49:40] [debug] #2 00008078 in public OnPlayerCommandText (playerid=3, cmdtext[]=@0x00d9855c "/invite 45") at C:\Users\Filip\Desktop\SERVER\pawno\include\zcmd.inc:110
pawn Код:
public GetFactionName(factionid,name[])
{

    new slot = GetFactionSlot(factionid);
    if(slot > -1)
    {

        return format(name,256,"%s",FactionInfo[slot][fName]);

    }
    return format(name,256,"None",FactionInfo[slot][fName]);

}
pawn Код:
COMMAND:invite(playerid,params[])
{

    if(CharacterInfo[playerid][active_character[playerid]][cFaction] > 0)
    {

        if(CharacterInfo[playerid][active_character[playerid]][cFactionPermissions] == FAC_PERM_LEAD)
        {

            new idx = 0;
            new tmp[MAX_PLAYER_NAME];
            tmp = strtok(params,idx);
            if(!strlen(tmp)) { SendClientMessageA(playerid,COLOR_LIGHTRED,"FOLOSESTE: /invite [playerid/player name]"); return 1; }
            new other = ReturnUser(tmp);
            if(!IsPlayerConnectedEx(other)) { SendClientMessageA(playerid,COLOR_LIGHTRED,"Playerul nu este conectat"); return 1; }
            faction_invite[other] = CharacterInfo[playerid][active_character[playerid]][cFaction];
            new str[256];
            new name[MAX_PLAYER_NAME];
            new facname[256];
            GetCharacterName(playerid,name);
            GetFactionName(CharacterInfo[playerid][active_character[playerid]][cFaction],facname);
            format(str,sizeof(str),"%s te-a invitat in factiunea %s (Foloseste /acceptinvite pentru a accepta).",name,facname);
            SendClientMessageA(other,COLOR_FACTION,str);
            GetCharacterName(other,name);
            format(str,sizeof(str),"L-ai invitat pe %s in factiunea ta.",name);
            SendClientMessageA(playerid,COLOR_FACTION,str);
            return 1;


        }
        else
        {

            SendClientMessage(playerid,COLOR_GREY,"Nu esti liderul acestei factiuni");
            return 1;

        }

    }
    else
    {

        SendClientMessage(playerid,COLOR_GREY,"Nu esti intr-o factiune.");
        return 1;

    }

}
Reply
#9

You only check if slot is greater than -1 to the first format, but in the second format it uses the slot in FactionInfo. So slot is -1 and it executes the second format.

pawn Код:
public GetFactionName(factionid)
{
    new name[64], slot = GetFactionSlot(factionid);
    if(slot > -1) format(name,64,"%s",FactionInfo[slot][fName]);
    else name = "N/A";
    return name;
}
And change:
pawn Код:
new facname[256];
GetCharacterName(playerid,name);
GetFactionName(CharacterInfo[playerid][active_character[playerid]][cFaction],facname);
to:
pawn Код:
new facname[64];
GetCharacterName(playerid,name);
strcat((facname[0] = '\0', facname), GetFactionName(CharacterInfo[playerid][active_character[playerid]][cFaction]), 64);
Reply
#10

pawn Код:
C:\Users\Filip\Desktop\SERVER\gamemodes\rp.pwn(17328) : error 090: public functions may not return arrays (symbol "GetFactionName")
C:\Users\Filip\Desktop\SERVER\gamemodes\rp.pwn(33763) : warning 202: number of arguments does not match definition
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


1 Error.
first from return name;

and last for
strcat
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)