SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 12/01/2019, 01:03 AM   #1
ApolloScripter
Big Clucker
 
ApolloScripter's Avatar
 
Join Date: Sep 2018
Posts: 155
Reputation: 1
Default [Help] Command Error

Hello, when i give this comand below, he return me in game "Invalid Command" and in the server log, show something very strange, and i dont know why.

Command:
PHP Code:
CMD:top(playerid)
{
    
LoadTOPTEN(playerid);

    
SendClientMessage(playeridDebugColor"Feito");
    return 
1;

Error on Server Log
Code:
[debug] Run time error 4: "Array index out of bounds"
[debug]  Attempted to read/write array element at index 14 in array of size 14
[debug] AMX backtrace:
[debug] #0 0008d3e0 in ?? (0) from ScavengeSurvive.amx
[debug] #1 00103fec in public cmd_top (0, 367595096) from ScavengeSurvive.amx
[debug] #2 native CallLocalFunction () from samp-server.exe
[debug] #3 000e1384 in ?? (0, 367595076) from ScavengeSurvive.amx
[debug] #4 0000e798 in public OnPlayerCommandText (0, 367595076) from ScavengeSurvive.amx
The function, I do not think that's the problem, but if is, here it is.
PHP Code:
LoadTOPTEN(playerid)
{
    
CaixasCTT[0] = TextDrawCreate(453.500000165.766662"usebox");
    
TextDrawLetterSize(CaixasCTT[0], 0.00000019.426538);
    
TextDrawTextSize(CaixasCTT[0], 191.5000000.000000);
    
TextDrawAlignment(CaixasCTT[0], 1);
    
TextDrawColor(CaixasCTT[0], 0);
    
TextDrawUseBox(CaixasCTT[0], true);
    
TextDrawBoxColor(CaixasCTT[0], 102);
    
TextDrawSetShadow(CaixasCTT[0], 0);
    
TextDrawSetOutline(CaixasCTT[0], 0);
    
TextDrawFont(CaixasCTT[0], 0);

    
CaixasCTT[2] = TextDrawCreate(453.500000165.766662"usebox");
    
TextDrawLetterSize(CaixasCTT[2], 0.000000, -0.123457);
    
TextDrawTextSize(CaixasCTT[2], 191.5000000.000000);
    
TextDrawAlignment(CaixasCTT[2], 1);
    
TextDrawColor(CaixasCTT[2], 0);
    
TextDrawUseBox(CaixasCTT[2], true);
    
TextDrawBoxColor(CaixasCTT[2], 65316);
    
TextDrawSetShadow(CaixasCTT[2], 0);
    
TextDrawSetOutline(CaixasCTT[2], 0);
    
TextDrawFont(CaixasCTT[2], 0);

    
CaixasCTT[3] = TextDrawCreate(452.500000185.677764"usebox");
    
TextDrawLetterSize(CaixasCTT[3], 0.000000, -0.454938);
    
TextDrawTextSize(CaixasCTT[3], 191.5000000.000000);
    
TextDrawAlignment(CaixasCTT[3], 1);
    
TextDrawColor(CaixasCTT[3], -1);
    
TextDrawUseBox(CaixasCTT[3], true);
    
TextDrawBoxColor(CaixasCTT[3], -227);
    
TextDrawSetShadow(CaixasCTT[3], 0);
    
TextDrawSetOutline(CaixasCTT[3], 0);
    
TextDrawFont(CaixasCTT[3], 0);

    
CaixasCTT[4] = TextDrawCreate(452.000000207.833343"usebox");
    
TextDrawLetterSize(CaixasCTT[4], 0.000000, -0.454938);
    
TextDrawTextSize(CaixasCTT[4], 191.0000000.000000);
    
TextDrawAlignment(CaixasCTT[4], 1);
    
TextDrawColor(CaixasCTT[4], -1);
    
TextDrawUseBox(CaixasCTT[4], true);
    
TextDrawBoxColor(CaixasCTT[4], -227);
    
TextDrawSetShadow(CaixasCTT[4], 0);
    
TextDrawSetOutline(CaixasCTT[4], 0);
    
TextDrawFont(CaixasCTT[4], 0);

    
CaixasCTT[5] = TextDrawCreate(453.500000226.500030"usebox");
    
TextDrawLetterSize(CaixasCTT[5], 0.000000, -0.454938);
    
TextDrawTextSize(CaixasCTT[5], 191.5000000.000000);
    
TextDrawAlignment(CaixasCTT[5], 1);
    
TextDrawColor(CaixasCTT[5], -1);
    
TextDrawUseBox(CaixasCTT[5], true);
    
TextDrawBoxColor(CaixasCTT[5], -227);
    
TextDrawSetShadow(CaixasCTT[5], 0);
    
TextDrawSetOutline(CaixasCTT[5], 0);
    
TextDrawFont(CaixasCTT[5], 0);

    
CaixasCTT[6] = TextDrawCreate(454.000000244.544494"usebox");
    
TextDrawLetterSize(CaixasCTT[6], 0.000000, -0.454938);
    
TextDrawTextSize(CaixasCTT[6], 192.0000000.000000);
    
TextDrawAlignment(CaixasCTT[6], 1);
    
TextDrawColor(CaixasCTT[6], -1);
    
TextDrawUseBox(CaixasCTT[6], true);
    
TextDrawBoxColor(CaixasCTT[6], -227);
    
TextDrawSetShadow(CaixasCTT[6], 0);
    
TextDrawSetOutline(CaixasCTT[6], 0);
    
TextDrawFont(CaixasCTT[6], 0);

    
CaixasCTT[7] = TextDrawCreate(453.500000258.233337"usebox");
    
TextDrawLetterSize(CaixasCTT[7], 0.000000, -0.454938);
    
TextDrawTextSize(CaixasCTT[7], 191.5000000.000000);
    
TextDrawAlignment(CaixasCTT[7], 1);
    
TextDrawColor(CaixasCTT[7], -1);
    
TextDrawUseBox(CaixasCTT[7], true);
    
TextDrawBoxColor(CaixasCTT[7], -227);
    
TextDrawSetShadow(CaixasCTT[7], 0);
    
TextDrawSetOutline(CaixasCTT[7], 0);
    
TextDrawFont(CaixasCTT[7], 0);

    
CaixasCTT[8] = TextDrawCreate(453.500000271.922241"usebox");
    
TextDrawLetterSize(CaixasCTT[8], 0.000000, -0.454938);
    
TextDrawTextSize(CaixasCTT[8], 191.5000000.000000);
    
TextDrawAlignment(CaixasCTT[8], 1);
    
TextDrawColor(CaixasCTT[8], -1);
    
TextDrawUseBox(CaixasCTT[8], true);
    
TextDrawBoxColor(CaixasCTT[8], -227);
    
TextDrawSetShadow(CaixasCTT[8], 0);
    
TextDrawSetOutline(CaixasCTT[8], 0);
    
TextDrawFont(CaixasCTT[8], 0);

    
CaixasCTT[9] = TextDrawCreate(453.500000285.611145"usebox");
    
TextDrawLetterSize(CaixasCTT[9], 0.000000, -0.454938);
    
TextDrawTextSize(CaixasCTT[9], 191.5000000.000000);
    
TextDrawAlignment(CaixasCTT[9], 1);
    
TextDrawColor(CaixasCTT[9], -1);
    
TextDrawUseBox(CaixasCTT[9], true);
    
TextDrawBoxColor(CaixasCTT[9], -227);
    
TextDrawSetShadow(CaixasCTT[9], 0);
    
TextDrawSetOutline(CaixasCTT[9], 0);
    
TextDrawFont(CaixasCTT[9], 0);

    
CaixasCTT[10] = TextDrawCreate(453.500000300.544494"usebox");
    
TextDrawLetterSize(CaixasCTT[10], 0.000000, -0.454938);
    
TextDrawTextSize(CaixasCTT[10], 191.5000000.000000);
    
TextDrawAlignment(CaixasCTT[10], 1);
    
TextDrawColor(CaixasCTT[10], -1);
    
TextDrawUseBox(CaixasCTT[10], true);
    
TextDrawBoxColor(CaixasCTT[10], -227);
    
TextDrawSetShadow(CaixasCTT[10], 0);
    
TextDrawSetOutline(CaixasCTT[10], 0);
    
TextDrawFont(CaixasCTT[10], 0);

    
CaixasCTT[11] = TextDrawCreate(453.500000315.477844"usebox");
    
TextDrawLetterSize(CaixasCTT[11], 0.000000, -0.454938);
    
TextDrawTextSize(CaixasCTT[11], 191.5000000.000000);
    
TextDrawAlignment(CaixasCTT[11], 1);
    
TextDrawColor(CaixasCTT[11], -1);
    
TextDrawUseBox(CaixasCTT[11], true);
    
TextDrawBoxColor(CaixasCTT[11], -227);
    
TextDrawSetShadow(CaixasCTT[11], 0);
    
TextDrawSetOutline(CaixasCTT[11], 0);
    
TextDrawFont(CaixasCTT[11], 0);

    
CaixasCTT[12] = TextDrawCreate(454.000000331.033386"usebox");
    
TextDrawLetterSize(CaixasCTT[12], 0.000000, -0.454938);
    
TextDrawTextSize(CaixasCTT[12], 192.0000000.000000);
    
TextDrawAlignment(CaixasCTT[12], 1);
    
TextDrawColor(CaixasCTT[12], -1);
    
TextDrawUseBox(CaixasCTT[12], true);
    
TextDrawBoxColor(CaixasCTT[12], -227);
    
TextDrawSetShadow(CaixasCTT[12], 0);
    
TextDrawSetOutline(CaixasCTT[12], 0);
    
TextDrawFont(CaixasCTT[12], 0);

    
ApText[0] = TextDrawCreate(211.000000171.733322"NOME");
    
TextDrawLetterSize(ApText[0], 0.2009990.759999);
    
TextDrawAlignment(ApText[0], 1);
    
TextDrawColor(ApText[0], -1);
    
TextDrawSetShadow(ApText[0], 0);
    
TextDrawSetOutline(ApText[0], 1);
    
TextDrawBackgroundColor(ApText[0], 51);
    
TextDrawFont(ApText[0], 2);
    
TextDrawSetProportional(ApText[0], 1);

    
ApText[1] = TextDrawCreate(306.500000171.488876"SCORE");
    
TextDrawLetterSize(ApText[1], 0.2009990.759999);
    
TextDrawAlignment(ApText[1], 1);
    
TextDrawColor(ApText[1], -1);
    
TextDrawSetShadow(ApText[1], 0);
    
TextDrawSetOutline(ApText[1], 1);
    
TextDrawBackgroundColor(ApText[1], 51);
    
TextDrawFont(ApText[1], 2);
    
TextDrawSetProportional(ApText[1], 1);

    
ApText[2] = TextDrawCreate(404.500000171.244430"HIT RATE");
    
TextDrawLetterSize(ApText[2], 0.2009990.759999);
    
TextDrawAlignment(ApText[2], 1);
    
TextDrawColor(ApText[2], -1);
    
TextDrawSetShadow(ApText[2], 0);
    
TextDrawSetOutline(ApText[2], 1);
    
TextDrawBackgroundColor(ApText[2], 51);
    
TextDrawFont(ApText[2], 2);
    
TextDrawSetProportional(ApText[2], 1);

    
ApText[3] = TextDrawCreate(198.000000191.644439"1.");
    
TextDrawLetterSize(ApText[3], 0.2549990.834666);
    
TextDrawAlignment(ApText[3], 1);
    
TextDrawColor(ApText[3], -2139062017);
    
TextDrawSetShadow(ApText[3], 0);
    
TextDrawSetOutline(ApText[3], 1);
    
TextDrawBackgroundColor(ApText[3], 51);
    
TextDrawFont(ApText[3], 2);
    
TextDrawSetProportional(ApText[3], 1);

    
ApText[4] = TextDrawCreate(198.000000212.555541"2.");
    
TextDrawLetterSize(ApText[4], 0.2120000.697777);
    
TextDrawAlignment(ApText[4], 1);
    
TextDrawColor(ApText[4], -2139062017);
    
TextDrawSetShadow(ApText[4], 0);
    
TextDrawSetOutline(ApText[4], 1);
    
TextDrawBackgroundColor(ApText[4], 51);
    
TextDrawFont(ApText[4], 2);
    
TextDrawSetProportional(ApText[4], 1);

    
ApText[5] = TextDrawCreate(198.000000230.977783"3.");
    
TextDrawLetterSize(ApText[5], 0.2120000.697777);
    
TextDrawAlignment(ApText[5], 1);
    
TextDrawColor(ApText[5], -2139062017);
    
TextDrawSetShadow(ApText[5], 0);
    
TextDrawSetOutline(ApText[5], 1);
    
TextDrawBackgroundColor(ApText[5], 51);
    
TextDrawFont(ApText[5], 2);
    
TextDrawSetProportional(ApText[5], 1);

    
ApText[6] = TextDrawCreate(198.000000246.288909"4.");
    
TextDrawLetterSize(ApText[6], 0.2120000.697777);
    
TextDrawAlignment(ApText[6], 1);
    
TextDrawColor(ApText[6], -2139062017);
    
TextDrawSetShadow(ApText[6], 0);
    
TextDrawSetOutline(ApText[6], 1);
    
TextDrawBackgroundColor(ApText[6], 51);
    
TextDrawFont(ApText[6], 2);
    
TextDrawSetProportional(ApText[6], 1);

    
ApText[7] = TextDrawCreate(198.000000259.733367"5.");
    
TextDrawLetterSize(ApText[7], 0.2120000.697777);
    
TextDrawAlignment(ApText[7], 1);
    
TextDrawColor(ApText[7], -2139062017);
    
TextDrawSetShadow(ApText[7], 0);
    
TextDrawSetOutline(ApText[7], 1);
    
TextDrawBackgroundColor(ApText[7], 51);
    
TextDrawFont(ApText[7], 2);
    
TextDrawSetProportional(ApText[7], 1);

    
ApText[8] = TextDrawCreate(198.000000273.177825"6.");
    
TextDrawLetterSize(ApText[8], 0.2120000.697777);
    
TextDrawAlignment(ApText[8], 1);
    
TextDrawColor(ApText[8], -2139062017);
    
TextDrawUseBox(ApText[8], true);
    
TextDrawBoxColor(ApText[8], 0);
    
TextDrawSetShadow(ApText[8], 0);
    
TextDrawSetOutline(ApText[8], 1);
    
TextDrawBackgroundColor(ApText[8], 51);
    
TextDrawFont(ApText[8], 2);
    
TextDrawSetProportional(ApText[8], 1);

    
ApText[9] = TextDrawCreate(197.500000287.244506"7.");
    
TextDrawLetterSize(ApText[9], 0.2120000.697777);
    
TextDrawAlignment(ApText[9], 1);
    
TextDrawColor(ApText[9], -2139062017);
    
TextDrawSetShadow(ApText[9], 0);
    
TextDrawSetOutline(ApText[9], 1);
    
TextDrawBackgroundColor(ApText[9], 51);
    
TextDrawFont(ApText[9], 2);
    
TextDrawSetProportional(ApText[9], 1);

    
ApText[10] = TextDrawCreate(197.500000302.555633"8.");
    
TextDrawLetterSize(ApText[10], 0.2120000.697777);
    
TextDrawAlignment(ApText[10], 1);
    
TextDrawColor(ApText[10], -2139062017);
    
TextDrawSetShadow(ApText[10], 0);
    
TextDrawSetOutline(ApText[10], 1);
    
TextDrawBackgroundColor(ApText[10], 51);
    
TextDrawFont(ApText[10], 2);
    
TextDrawSetProportional(ApText[10], 1);

    
ApText[11] = TextDrawCreate(197.500000317.866760"9.");
    
TextDrawLetterSize(ApText[11], 0.2120000.697777);
    
TextDrawAlignment(ApText[11], 1);
    
TextDrawColor(ApText[11], -2139062017);
    
TextDrawSetShadow(ApText[11], 0);
    
TextDrawSetOutline(ApText[11], 1);
    
TextDrawBackgroundColor(ApText[11], 51);
    
TextDrawFont(ApText[11], 2);
    
TextDrawSetProportional(ApText[11], 1);

    
ApText[12] = TextDrawCreate(196.000000332.555664"10.");
    
TextDrawLetterSize(ApText[12], 0.2120000.697777);
    
TextDrawAlignment(ApText[12], 1);
    
TextDrawColor(ApText[12], -2139062017);
    
TextDrawSetShadow(ApText[12], 0);
    
TextDrawSetOutline(ApText[12], 1);
    
TextDrawBackgroundColor(ApText[12], 51);
    
TextDrawFont(ApText[12], 2);
    
TextDrawSetProportional(ApText[12], 1);

    
NomeJogador[0] = TextDrawCreate(209.500000189.777770"Apollo");
    
TextDrawLetterSize(NomeJogador[0], 0.3465001.189333);
    
TextDrawAlignment(NomeJogador[0], 1);
    
TextDrawColor(NomeJogador[0], -1);
    
TextDrawSetShadow(NomeJogador[0], 0);
    
TextDrawSetOutline(NomeJogador[0], 1);
    
TextDrawBackgroundColor(NomeJogador[0], 51);
    
TextDrawFont(NomeJogador[0], 1);
    
TextDrawSetProportional(NomeJogador[0], 1);

    
NomeJogador[1] = TextDrawCreate(209.000000209.444458"Apollo");
    
TextDrawLetterSize(NomeJogador[1], 0.3465001.189333);
    
TextDrawAlignment(NomeJogador[1], 1);
    
TextDrawColor(NomeJogador[1], -1);
    
TextDrawSetShadow(NomeJogador[1], 0);
    
TextDrawSetOutline(NomeJogador[1], 1);
    
TextDrawBackgroundColor(NomeJogador[1], 51);
    
TextDrawFont(NomeJogador[1], 1);
    
TextDrawSetProportional(NomeJogador[1], 1);

    
NomeJogador[2] = TextDrawCreate(209.000000227.866699"Apollo");
    
TextDrawLetterSize(NomeJogador[2], 0.3185001.083555);
    
TextDrawAlignment(NomeJogador[2], 1);
    
TextDrawColor(NomeJogador[2], -1);
    
TextDrawSetShadow(NomeJogador[2], 0);
    
TextDrawSetOutline(NomeJogador[2], 1);
    
TextDrawBackgroundColor(NomeJogador[2], 51);
    
TextDrawFont(NomeJogador[2], 1);
    
TextDrawSetProportional(NomeJogador[2], 1);

    
NomeJogador[3] = TextDrawCreate(210.000000244.422271"Apollo");
    
TextDrawLetterSize(NomeJogador[3], 0.2830000.921777);
    
TextDrawAlignment(NomeJogador[3], 1);
    
TextDrawColor(NomeJogador[3], -1);
    
TextDrawSetShadow(NomeJogador[3], 0);
    
TextDrawSetOutline(NomeJogador[3], 1);
    
TextDrawBackgroundColor(NomeJogador[3], 51);
    
TextDrawFont(NomeJogador[3], 1);
    
TextDrawSetProportional(NomeJogador[3], 1);

    
NomeJogador[4] = TextDrawCreate(210.000000258.488952"Apollo");
    
TextDrawLetterSize(NomeJogador[4], 0.2830000.921777);
    
TextDrawAlignment(NomeJogador[4], 1);
    
TextDrawColor(NomeJogador[4], -1);
    
TextDrawSetShadow(NomeJogador[4], 0);
    
TextDrawSetOutline(NomeJogador[4], 1);
    
TextDrawBackgroundColor(NomeJogador[4], 51);
    
TextDrawFont(NomeJogador[4], 1);
    
TextDrawSetProportional(NomeJogador[4], 1);

    
NomeJogador[5] = TextDrawCreate(210.000000271.933410"Apollo");
    
TextDrawLetterSize(NomeJogador[5], 0.2830000.921777);
    
TextDrawAlignment(NomeJogador[5], 1);
    
TextDrawColor(NomeJogador[5], -1);
    
TextDrawSetShadow(NomeJogador[5], 0);
    
TextDrawSetOutline(NomeJogador[5], 1);
    
TextDrawBackgroundColor(NomeJogador[5], 51);
    
TextDrawFont(NomeJogador[5], 1);
    
TextDrawSetProportional(NomeJogador[5], 1);

    
NomeJogador[6] = TextDrawCreate(210.000000286.000091"Apollo");
    
TextDrawLetterSize(NomeJogador[6], 0.2830000.921777);
    
TextDrawAlignment(NomeJogador[6], 1);
    
TextDrawColor(NomeJogador[6], -1);
    
TextDrawSetShadow(NomeJogador[6], 0);
    
TextDrawSetOutline(NomeJogador[6], 1);
    
TextDrawBackgroundColor(NomeJogador[6], 51);
    
TextDrawFont(NomeJogador[6], 1);
    
TextDrawSetProportional(NomeJogador[6], 1);

    
NomeJogador[7] = TextDrawCreate(210.500000301.311218"Apollo");
    
TextDrawLetterSize(NomeJogador[7], 0.2830000.921777);
    
TextDrawAlignment(NomeJogador[7], 1);
    
TextDrawColor(NomeJogador[7], -1);
    
TextDrawSetShadow(NomeJogador[7], 0);
    
TextDrawSetOutline(NomeJogador[7], 1);
    
TextDrawBackgroundColor(NomeJogador[7], 51);
    
TextDrawFont(NomeJogador[7], 1);
    
TextDrawSetProportional(NomeJogador[7], 1);

    
NomeJogador[8] = TextDrawCreate(210.500000316.622344"Apollo");
    
TextDrawLetterSize(NomeJogador[8], 0.2830000.921777);
    
TextDrawAlignment(NomeJogador[8], 1);
    
TextDrawColor(NomeJogador[8], -1);
    
TextDrawSetShadow(NomeJogador[8], 0);
    
TextDrawSetOutline(NomeJogador[8], 1);
    
TextDrawBackgroundColor(NomeJogador[8], 51);
    
TextDrawFont(NomeJogador[8], 1);
    
TextDrawSetProportional(NomeJogador[8], 1);

    
NomeJogador[9] = TextDrawCreate(210.500000331.311248"Apollo");
    
TextDrawLetterSize(NomeJogador[9], 0.2830000.921777);
    
TextDrawAlignment(NomeJogador[9], 1);
    
TextDrawColor(NomeJogador[9], -1);
    
TextDrawSetShadow(NomeJogador[9], 0);
    
TextDrawSetOutline(NomeJogador[9], 1);
    
TextDrawBackgroundColor(NomeJogador[9], 51);
    
TextDrawFont(NomeJogador[9], 1);
    
TextDrawSetProportional(NomeJogador[9], 1);

    
PlayerScore[0] = TextDrawCreate(319.000000189.533325"100");
    
TextDrawLetterSize(PlayerScore[0], 0.3465001.189333);
    
TextDrawAlignment(PlayerScore[0], 2);
    
TextDrawColor(PlayerScore[0], -1);
    
TextDrawSetShadow(PlayerScore[0], 0);
    
TextDrawSetOutline(PlayerScore[0], 1);
    
TextDrawBackgroundColor(PlayerScore[0], 51);
    
TextDrawFont(PlayerScore[0], 1);
    
TextDrawSetProportional(PlayerScore[0], 1);

    
PlayerScore[1] = TextDrawCreate(319.500000209.200012"100");
    
TextDrawLetterSize(PlayerScore[1], 0.3465001.189333);
    
TextDrawAlignment(PlayerScore[1], 2);
    
TextDrawColor(PlayerScore[1], -1);
    
TextDrawSetShadow(PlayerScore[1], 0);
    
TextDrawSetOutline(PlayerScore[1], 1);
    
TextDrawBackgroundColor(PlayerScore[1], 51);
    
TextDrawFont(PlayerScore[1], 1);
    
TextDrawSetProportional(PlayerScore[1], 1);

    
PlayerScore[2] = TextDrawCreate(319.000000228.244476"100");
    
TextDrawLetterSize(PlayerScore[2], 0.3185001.083555);
    
TextDrawAlignment(PlayerScore[2], 2);
    
TextDrawColor(PlayerScore[2], -1);
    
TextDrawSetShadow(PlayerScore[2], 0);
    
TextDrawSetOutline(PlayerScore[2], 1);
    
TextDrawBackgroundColor(PlayerScore[2], 51);
    
TextDrawFont(PlayerScore[2], 1);
    
TextDrawSetProportional(PlayerScore[2], 1);

    
PlayerScore[3] = TextDrawCreate(319.000000244.800048"100");
    
TextDrawLetterSize(PlayerScore[3], 0.2830000.921777);
    
TextDrawAlignment(PlayerScore[3], 2);
    
TextDrawColor(PlayerScore[3], -1);
    
TextDrawSetShadow(PlayerScore[3], 0);
    
TextDrawSetOutline(PlayerScore[3], 1);
    
TextDrawBackgroundColor(PlayerScore[3], 51);
    
TextDrawFont(PlayerScore[3], 1);
    
TextDrawSetProportional(PlayerScore[3], 1);

    
PlayerScore[4] = TextDrawCreate(319.000000258.866729"100");
    
TextDrawLetterSize(PlayerScore[4], 0.2830000.921777);
    
TextDrawAlignment(PlayerScore[4], 2);
    
TextDrawColor(PlayerScore[4], -1);
    
TextDrawSetShadow(PlayerScore[4], 0);
    
TextDrawSetOutline(PlayerScore[4], 1);
    
TextDrawBackgroundColor(PlayerScore[4], 51);
    
TextDrawFont(PlayerScore[4], 1);
    
TextDrawSetProportional(PlayerScore[4], 1);

    
PlayerScore[5] = TextDrawCreate(319.000000272.311187"100");
    
TextDrawLetterSize(PlayerScore[5], 0.2830000.921777);
    
TextDrawAlignment(PlayerScore[5], 2);
    
TextDrawColor(PlayerScore[5], -1);
    
TextDrawSetShadow(PlayerScore[5], 0);
    
TextDrawSetOutline(PlayerScore[5], 1);
    
TextDrawBackgroundColor(PlayerScore[5], 51);
    
TextDrawFont(PlayerScore[5], 1);
    
TextDrawSetProportional(PlayerScore[5], 1);

    
PlayerScore[6] = TextDrawCreate(319.000000286.377868"100");
    
TextDrawLetterSize(PlayerScore[6], 0.2830000.921777);
    
TextDrawAlignment(PlayerScore[6], 2);
    
TextDrawColor(PlayerScore[6], -1);
    
TextDrawSetShadow(PlayerScore[6], 0);
    
TextDrawSetOutline(PlayerScore[6], 1);
    
TextDrawBackgroundColor(PlayerScore[6], 51);
    
TextDrawFont(PlayerScore[6], 1);
    
TextDrawSetProportional(PlayerScore[6], 1);

    
PlayerScore[7] = TextDrawCreate(319.000000301.066772"100");
    
TextDrawLetterSize(PlayerScore[7], 0.2830000.921777);
    
TextDrawAlignment(PlayerScore[7], 2);
    
TextDrawColor(PlayerScore[7], -1);
    
TextDrawSetShadow(PlayerScore[7], 0);
    
TextDrawSetOutline(PlayerScore[7], 1);
    
TextDrawBackgroundColor(PlayerScore[7], 51);
    
TextDrawFont(PlayerScore[7], 1);
    
TextDrawSetProportional(PlayerScore[7], 1);

    
PlayerScore[8] = TextDrawCreate(319.000000317.000122"100");
    
TextDrawLetterSize(PlayerScore[8], 0.2830000.921777);
    
TextDrawAlignment(PlayerScore[8], 2);
    
TextDrawColor(PlayerScore[8], -1);
    
TextDrawSetShadow(PlayerScore[8], 0);
    
TextDrawSetOutline(PlayerScore[8], 1);
    
TextDrawBackgroundColor(PlayerScore[8], 51);
    
TextDrawFont(PlayerScore[8], 1);
    
TextDrawSetProportional(PlayerScore[8], 1);

    
PlayerScore[9] = TextDrawCreate(319.000000331.689025"100");
    
TextDrawLetterSize(PlayerScore[9], 0.2830000.921777);
    
TextDrawAlignment(PlayerScore[9], 2);
    
TextDrawColor(PlayerScore[9], -1);
    
TextDrawSetShadow(PlayerScore[9], 0);
    
TextDrawSetOutline(PlayerScore[9], 1);
    
TextDrawBackgroundColor(PlayerScore[9], 51);
    
TextDrawFont(PlayerScore[9], 1);
    
TextDrawSetProportional(PlayerScore[9], 1);

    
CaixasCTT[13] = TextDrawCreate(200.000000171.488876"-");
    
TextDrawLetterSize(CaixasCTT[13], 0.2009990.759999);
    
TextDrawAlignment(CaixasCTT[13], 1);
    
TextDrawColor(CaixasCTT[13], -1);
    
TextDrawSetShadow(CaixasCTT[13], 0);
    
TextDrawSetOutline(CaixasCTT[13], 1);
    
TextDrawBackgroundColor(CaixasCTT[13], 51);
    
TextDrawFont(CaixasCTT[13], 2);
    
TextDrawSetProportional(CaixasCTT[13], 1);

    
PlayerHitRate[0] = TextDrawCreate(437.000000188.666656"200");
    
TextDrawLetterSize(PlayerHitRate[0], 0.3465001.189333);
    
TextDrawAlignment(PlayerHitRate[0], 3);
    
TextDrawColor(PlayerHitRate[0], -1);
    
TextDrawSetShadow(PlayerHitRate[0], 0);
    
TextDrawSetOutline(PlayerHitRate[0], 1);
    
TextDrawBackgroundColor(PlayerHitRate[0], 51);
    
TextDrawFont(PlayerHitRate[0], 1);
    
TextDrawSetProportional(PlayerHitRate[0], 1);

    
PlayerHitRate[1] = TextDrawCreate(437.000000208.955566"200");
    
TextDrawLetterSize(PlayerHitRate[1], 0.3465001.189333);
    
TextDrawAlignment(PlayerHitRate[1], 3);
    
TextDrawColor(PlayerHitRate[1], -1);
    
TextDrawSetShadow(PlayerHitRate[1], 0);
    
TextDrawSetOutline(PlayerHitRate[1], 1);
    
TextDrawBackgroundColor(PlayerHitRate[1], 51);
    
TextDrawFont(PlayerHitRate[1], 1);
    
TextDrawSetProportional(PlayerHitRate[1], 1);

    
PlayerHitRate[2] = TextDrawCreate(436.500000228.622253"200");
    
TextDrawLetterSize(PlayerHitRate[2], 0.3185001.083555);
    
TextDrawAlignment(PlayerHitRate[2], 3);
    
TextDrawColor(PlayerHitRate[2], -1);
    
TextDrawSetShadow(PlayerHitRate[2], 0);
    
TextDrawSetOutline(PlayerHitRate[2], 1);
    
TextDrawBackgroundColor(PlayerHitRate[2], 51);
    
TextDrawFont(PlayerHitRate[2], 1);
    
TextDrawSetProportional(PlayerHitRate[2], 1);

    
PlayerHitRate[3] = TextDrawCreate(436.500000244.555603"200");
    
TextDrawLetterSize(PlayerHitRate[3], 0.2830000.921777);
    
TextDrawAlignment(PlayerHitRate[3], 3);
    
TextDrawColor(PlayerHitRate[3], -1);
    
TextDrawSetShadow(PlayerHitRate[3], 0);
    
TextDrawSetOutline(PlayerHitRate[3], 1);
    
TextDrawBackgroundColor(PlayerHitRate[3], 51);
    
TextDrawFont(PlayerHitRate[3], 1);
    
TextDrawSetProportional(PlayerHitRate[3], 1);

    
PlayerHitRate[4] = TextDrawCreate(437.000000258.622283"200");
    
TextDrawLetterSize(PlayerHitRate[4], 0.2830000.921777);
    
TextDrawAlignment(PlayerHitRate[4], 3);
    
TextDrawColor(PlayerHitRate[4], -1);
    
TextDrawSetShadow(PlayerHitRate[4], 0);
    
TextDrawSetOutline(PlayerHitRate[4], 1);
    
TextDrawBackgroundColor(PlayerHitRate[4], 51);
    
TextDrawFont(PlayerHitRate[4], 1);
    
TextDrawSetProportional(PlayerHitRate[4], 1);

    
PlayerHitRate[5] = TextDrawCreate(437.500000272.066741"200");
    
TextDrawLetterSize(PlayerHitRate[5], 0.2830000.921777);
    
TextDrawAlignment(PlayerHitRate[5], 3);
    
TextDrawColor(PlayerHitRate[5], -1);
    
TextDrawSetShadow(PlayerHitRate[5], 0);
    
TextDrawSetOutline(PlayerHitRate[5], 1);
    
TextDrawBackgroundColor(PlayerHitRate[5], 51);
    
TextDrawFont(PlayerHitRate[5], 1);
    
TextDrawSetProportional(PlayerHitRate[5], 1);

    
PlayerHitRate[6] = TextDrawCreate(437.500000286.133422"200");
    
TextDrawLetterSize(PlayerHitRate[6], 0.2830000.921777);
    
TextDrawAlignment(PlayerHitRate[6], 3);
    
TextDrawColor(PlayerHitRate[6], -1);
    
TextDrawSetShadow(PlayerHitRate[6], 0);
    
TextDrawSetOutline(PlayerHitRate[6], 1);
    
TextDrawBackgroundColor(PlayerHitRate[6], 51);
    
TextDrawFont(PlayerHitRate[6], 1);
    
TextDrawSetProportional(PlayerHitRate[6], 1);

    
PlayerHitRate[7] = TextDrawCreate(437.500000301.444549"200");
    
TextDrawLetterSize(PlayerHitRate[7], 0.2830000.921777);
    
TextDrawAlignment(PlayerHitRate[7], 3);
    
TextDrawColor(PlayerHitRate[7], -1);
    
TextDrawSetShadow(PlayerHitRate[7], 0);
    
TextDrawSetOutline(PlayerHitRate[7], 1);
    
TextDrawBackgroundColor(PlayerHitRate[7], 51);
    
TextDrawFont(PlayerHitRate[7], 1);
    
TextDrawSetProportional(PlayerHitRate[7], 1);

    
PlayerHitRate[8] = TextDrawCreate(437.500000316.755676"200");
    
TextDrawLetterSize(PlayerHitRate[8], 0.2830000.921777);
    
TextDrawAlignment(PlayerHitRate[8], 3);
    
TextDrawColor(PlayerHitRate[8], -1);
    
TextDrawSetShadow(PlayerHitRate[8], 0);
    
TextDrawSetOutline(PlayerHitRate[8], 1);
    
TextDrawBackgroundColor(PlayerHitRate[8], 51);
    
TextDrawFont(PlayerHitRate[8], 1);
    
TextDrawSetProportional(PlayerHitRate[8], 1);

    
PlayerHitRate[9] = TextDrawCreate(437.500000331.444580"200");
    
TextDrawLetterSize(PlayerHitRate[9], 0.2830000.921777);
    
TextDrawAlignment(PlayerHitRate[9], 3);
    
TextDrawColor(PlayerHitRate[9], -1);
    
TextDrawSetShadow(PlayerHitRate[9], 0);
    
TextDrawSetOutline(PlayerHitRate[9], 1);
    
TextDrawBackgroundColor(PlayerHitRate[9], 51);
    
TextDrawFont(PlayerHitRate[9], 1);
    
TextDrawSetProportional(PlayerHitRate[9], 1);

    
CloseButton TextDrawCreate(439.500000147.466674"X");
    
TextDrawLetterSize(CloseButton0.4499991.600000);
    
TextDrawTextSize(CloseButton450.00000010.000000);
    
TextDrawAlignment(CloseButton1);
    
TextDrawColor(CloseButton, -1);
    
TextDrawUseBox(CloseButtontrue);
    
TextDrawBoxColor(CloseButton255);
    
TextDrawSetShadow(CloseButton0);
    
TextDrawSetOutline(CloseButton1);
    
TextDrawBackgroundColor(CloseButton51);
    
TextDrawFont(CloseButton2);
    
TextDrawSetProportional(CloseButton1);

    for(new 
015c++)
    {
        
TextDrawShowForPlayer(playeridCaixasCTT[c]);
    }

    
/*for(new a = 0; a < 14; a++)
    {
        TextDrawShowForPlayer(playerid, ApText[a]);
    }*/

    
for(new pl 0pl 12pl++)
    {
        
TextDrawShowForPlayer(playeridNomeJogador[pl]);
    }

    for(new 
po 0po 12po++)
    {
        
TextDrawShowForPlayer(playeridPlayerScore[po]);
    }

    for(new 
pa 0pa 12pa++)
    {
        
TextDrawShowForPlayer(playeridPlayerHitRate[pa]);
    }

    
TextDrawShowForPlayer(playeridCloseButton);
    
SelectTextDraw(playerid0xb0b7c1ff);

My Variables:
PHP Code:
new Text:CaixasCTT[14];
new 
Text:ApText[14];
new 
Text:NomeJogador[11];
new 
Text:PlayerScore[11];
new 
Text:PlayerHitRate[11];
new 
Text:CloseButton
Someone can help me?
__________________
ApolloScripter is online now   Reply With Quote
Old 12/01/2019, 01:25 AM   #2
ConnorW
Big Clucker
 
ConnorW's Avatar
 
Join Date: Apr 2012
Location: Los Santos
Posts: 126
Reputation: 49
Default Re: [Help] Command Error

Remove these from LoadTOPTEN
pawn Code:
for(new c = 0; c < 15; c++)
    {
        TextDrawShowForPlayer(playerid, CaixasCTT[c]);
    }

    /*for(new a = 0; a < 14; a++)
    {
        TextDrawShowForPlayer(playerid, ApText[a]);
    }*/


    for(new pl = 0; pl < 12; pl++)
    {
        TextDrawShowForPlayer(playerid, NomeJogador[pl]);
    }

    for(new po = 0; po < 12; po++)
    {
        TextDrawShowForPlayer(playerid, PlayerScore[po]);
    }

    for(new pa = 0; pa < 12; pa++)
    {
        TextDrawShowForPlayer(playerid, PlayerHitRate[pa]);
    }

    TextDrawShowForPlayer(playerid, CloseButton);
    SelectTextDraw(playerid, 0xb0b7c1ff);
remove playerid from LoadTOPTEN leave it LoadTOPTEN()
put LoadTOPTEN at OnGamemodeInit e.g
pawn Code:
public OnGameModeInit()
{
    LoadTOPTEN();
    return 1;
}

And here's the command
pawn Code:
CMD:top(playerid)
{
    for(new c = 0; c < 15; c++)
    {
        TextDrawShowForPlayer(playerid, CaixasCTT[c]);
    }

    /*for(new a = 0; a < 14; a++)
    {
        TextDrawShowForPlayer(playerid, ApText[a]);
    }*/


    for(new pl = 0; pl < 12; pl++)
    {
        TextDrawShowForPlayer(playerid, NomeJogador[pl]);
    }

    for(new po = 0; po < 12; po++)
    {
        TextDrawShowForPlayer(playerid, PlayerScore[po]);
    }

    for(new pa = 0; pa < 12; pa++)
    {
        TextDrawShowForPlayer(playerid, PlayerHitRate[pa]);
    }

    TextDrawShowForPlayer(playerid, CloseButton);
    SelectTextDraw(playerid, 0xb0b7c1ff);
     
     
    SendClientMessage(playerid, DebugColor, "Feito");
    return 1;
}
__________________
ConnorW is offline   Reply With Quote
Old 12/01/2019, 05:59 AM   #3
ApolloScripter
Big Clucker
 
ApolloScripter's Avatar
 
Join Date: Sep 2018
Posts: 155
Reputation: 1
Default Re: [Help] Command Error

Quote:
Originally Posted by ConnorW View Post
Remove these from LoadTOPTEN
pawn Code:
for(new c = 0; c < 15; c++)
    {
        TextDrawShowForPlayer(playerid, CaixasCTT[c]);
    }

    /*for(new a = 0; a < 14; a++)
    {
        TextDrawShowForPlayer(playerid, ApText[a]);
    }*/


    for(new pl = 0; pl < 12; pl++)
    {
        TextDrawShowForPlayer(playerid, NomeJogador[pl]);
    }

    for(new po = 0; po < 12; po++)
    {
        TextDrawShowForPlayer(playerid, PlayerScore[po]);
    }

    for(new pa = 0; pa < 12; pa++)
    {
        TextDrawShowForPlayer(playerid, PlayerHitRate[pa]);
    }

    TextDrawShowForPlayer(playerid, CloseButton);
    SelectTextDraw(playerid, 0xb0b7c1ff);
remove playerid from LoadTOPTEN leave it LoadTOPTEN()
put LoadTOPTEN at OnGamemodeInit e.g
pawn Code:
public OnGameModeInit()
{
    LoadTOPTEN();
    return 1;
}

And here's the command
pawn Code:
CMD:top(playerid)
{
    for(new c = 0; c < 15; c++)
    {
        TextDrawShowForPlayer(playerid, CaixasCTT[c]);
    }

    /*for(new a = 0; a < 14; a++)
    {
        TextDrawShowForPlayer(playerid, ApText[a]);
    }*/


    for(new pl = 0; pl < 12; pl++)
    {
        TextDrawShowForPlayer(playerid, NomeJogador[pl]);
    }

    for(new po = 0; po < 12; po++)
    {
        TextDrawShowForPlayer(playerid, PlayerScore[po]);
    }

    for(new pa = 0; pa < 12; pa++)
    {
        TextDrawShowForPlayer(playerid, PlayerHitRate[pa]);
    }

    TextDrawShowForPlayer(playerid, CloseButton);
    SelectTextDraw(playerid, 0xb0b7c1ff);
     
     
    SendClientMessage(playerid, DebugColor, "Feito");
    return 1;
}
Nothing, still giving the same error, canceling the execution of the rest of the command.
__________________
ApolloScripter is online now   Reply With Quote
Old 12/01/2019, 06:18 AM   #4
ConnorW
Big Clucker
 
ConnorW's Avatar
 
Join Date: Apr 2012
Location: Los Santos
Posts: 126
Reputation: 49
Default Re: [Help] Command Error

Quote:
Originally Posted by ApolloScripter View Post
Nothing, still giving the same error, canceling the execution of the rest of the command.
Oh I'm sorry, i did just copied your code at the command, so here's why it crash
Code:
Attempted to read/write array element at index 14 in array of size 14
Now it should work, also use Zeex's pawn compiler, is way much better.
pawn Code:
CMD:top(playerid)
{
    for(new i = 0; i < 14; i++) { TextDrawShowForPlayer(playerid, CaixasCTT[i]); } //here was the error, the script attempted to read a non-existent array
    for(new i = 0; i < 14; i++) { TextDrawShowForPlayer(playerid, ApText[i]); }
    for(new i = 0; i < 10; i++) { TextDrawShowForPlayer(playerid, NomeJogador[i]); }
    for(new i = 0; i < 10; i++) { TextDrawShowForPlayer(playerid, PlayerScore[i]); }
    for(new i = 0; i < 10; i++) { TextDrawShowForPlayer(playerid, PlayerHitRate[i]); }
    TextDrawShowForPlayer(playerid, CloseButton);
    SelectTextDraw(playerid, 0xb0b7c1ff);
    SendClientMessage(playerid, DebugColor, "Feito");
    return 1;
}
__________________
ConnorW is offline   Reply With Quote
Old 12/01/2019, 08:03 PM   #5
ApolloScripter
Big Clucker
 
ApolloScripter's Avatar
 
Join Date: Sep 2018
Posts: 155
Reputation: 1
Default Re: [Help] Command Error

Quote:
Originally Posted by ConnorW View Post
Oh I'm sorry, i did just copied your code at the command, so here's why it crash
Code:
Attempted to read/write array element at index 14 in array of size 14
Now it should work, also use Zeex's pawn compiler, is way much better.
pawn Code:
CMD:top(playerid)
{
    for(new i = 0; i < 14; i++) { TextDrawShowForPlayer(playerid, CaixasCTT[i]); } //here was the error, the script attempted to read a non-existent array
    for(new i = 0; i < 14; i++) { TextDrawShowForPlayer(playerid, ApText[i]); }
    for(new i = 0; i < 10; i++) { TextDrawShowForPlayer(playerid, NomeJogador[i]); }
    for(new i = 0; i < 10; i++) { TextDrawShowForPlayer(playerid, PlayerScore[i]); }
    for(new i = 0; i < 10; i++) { TextDrawShowForPlayer(playerid, PlayerHitRate[i]); }
    TextDrawShowForPlayer(playerid, CloseButton);
    SelectTextDraw(playerid, 0xb0b7c1ff);
    SendClientMessage(playerid, DebugColor, "Feito");
    return 1;
}
Thanks, it works.
__________________
ApolloScripter is online now   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



All times are GMT. The time now is 08:56 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.