Help - 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: Help (
/showthread.php?tid=598096)
Help -
Kqly - 08.01.2016
help me ;c
Код:
[22:35:27] [debug] Run time error 4: "Array index out of bounds"
[22:35:27] [debug] Accessing element at index 48 past array upper bound 31
[22:35:27] [debug] AMX backtrace:
[22:35:27] [debug] #0 00016b94 in ?? (0) from new.amx
[22:35:27] [debug] #1 00018458 in public cmd_dildo (0, 455140) from new.amx
[22:35:27] [debug] #2 native CallLocalFunction () from samp-server.exe
[22:35:27] [debug] #3 000003e0 in public OnPlayerCommandText (0, 455112) from new.amx
[22:35:31] [debug] Run time error 4: "Array index out of bounds"
[22:35:31] [debug] Accessing element at index 48 past array upper bound 31
[22:35:31] [debug] AMX backtrace:
[22:35:31] [debug] #0 00016b94 in ?? (0) from new.amx
[22:35:31] [debug] #1 00018458 in public cmd_dildo (0, 455140) from new.amx
[22:35:31] [debug] #2 native CallLocalFunction () from samp-server.exe
[22:35:31] [debug] #3 000003e0 in public OnPlayerCommandText (0, 455112) from new.amx
[22:36:28] [debug] Run time error 4: "Array index out of bounds"
[22:36:28] [debug] Accessing element at index 48 past array upper bound 31
[22:36:28] [debug] AMX backtrace:
[22:36:28] [debug] #0 00016b94 in ?? (0) from new.amx
[22:36:28] [debug] #1 00012d58 in public OnDialogResponse (0, 6, 1, 0, 455112) from new.amx
[22:36:30] [debug] Run time error 4: "Array index out of bounds"
[22:36:30] [debug] Accessing element at index 48 past array upper bound 31
[22:36:30] [debug] AMX backtrace:
[22:36:30] [debug] #0 00016b94 in ?? (0) from new.amx
[22:36:30] [debug] #1 00017d34 in public cmd_chainsaw (0, 455152) from new.amx
[22:36:30] [debug] #2 native CallLocalFunction () from samp-server.exe
[22:36:30] [debug] #3 000003e0 in public OnPlayerCommandText (0, 455112) from new.amx
CMD:
Код:
CMD:dildo(playerid,params[])
{
Check(playerid);
PlayerInfo[playerid][DmMode] = 3;
PlayerInfo[playerid][DmID] = 17;
DeathMatch[18][dOnline]++;
ResetPlayerWeapons(playerid);
SetPlayerInterior(playerid, 0);
SetPlayerVirtualWorld(playerid,888);
GivePlayerWeapon(playerid,10,1);
SetPlayerHealth(playerid, 100);
SetPlayerPos(playerid, 470.2056,-1856.0343,8.2848);
SetPlayerFacingAngle(playerid, 179.8550);
new string[145];
format(string, sizeof(string), ""GREEN">> DEATHMATCH: %s(%d) joined (players: %d/20)", PlayerInfo[playerid][pName], playerid,DeathMatch[17][dOnline]);
SendDeathMatch(18, -1, string);
return 1;
}
Zone(playerid):
Код:
stock Check(playerid)
{
if(PlayerInfo[playerid][DmID] != 0)
{
DeathMatch[PlayerInfo[playerid][DmID]][dOnline]--;
new string[145];
format(string, sizeof(string), ""GREEN">> DEATHMATCH: %s(%d) left (players: %d/20)", PlayerInfo[playerid][pName], playerid,DeathMatch[PlayerInfo[playerid][DmID]][dOnline]);
SendDeathMatch(PlayerInfo[playerid][DmID], -1, string);
}
}
Re: Help -
Mencent - 08.01.2016
Hello!
Can you print the command like this:
PHP код:
CMD:dildo(playerid,params[])
{
print("Called /dildo");
Check(playerid);
print("Check(playerid);");
PlayerInfo[playerid][DmMode] = 3;
PlayerInfo[playerid][DmID] = 17;
print("set DMMode and DMID");
DeathMatch[18][dOnline]++;
print("dOnline in 18 ++");
ResetPlayerWeapons(playerid);
print("ResetWeapons");
SetPlayerInterior(playerid, 0);
SetPlayerVirtualWorld(playerid,888);
print("World and Interior");
GivePlayerWeapon(playerid,10,1);
print("Weapon");
SetPlayerHealth(playerid, 100);
print("HP");
SetPlayerPos(playerid, 470.2056,-1856.0343,8.2848);
SetPlayerFacingAngle(playerid, 179.8550);
print("Pos and Angle");
new string[145];
format(string, sizeof(string), ""GREEN">> DEATHMATCH: %s(%d) joined (players: %d/20)", PlayerInfo[playerid][pName], playerid,DeathMatch[17][dOnline]);
SendDeathMatch(18, -1, string);
print("Message");
return 1;
}
What is then printing in the console (server.log) if you use this command?