error 033: array must be indexed
#1

error 033: array must be indexed (variable "CircularMenu")

Код:
public OnPlayerClickTextDraw(playerid, Text:clickedid)
{
    AntiDeAMX();
 	switch(clickedid == CircularMenu)
	{
		case 15:
		{
		 
		}
		case 16: SendClientMessage(playerid, -1, "");
		case 17:
		{
			ShowPlayerDialog(playerid,10001, DIALOG_STYLE_LIST, "", "µЎЕ§", "ВЎаЕФЎ");
		}
		case 18: SendClientMessage(playerid, -1, "");
		case 19: 
		{
		    SendClientMessage(playerid, -1, "");
		    SendClientMessage(playerid, -1, "");
		}
		case 20: SendClientMessage(playerid, -1, "");
		case 21: SendClientMessage(playerid, -1, "");
		case 22: SendClientMessage(playerid, -1, "");
		case 23:
		{
			for(new i = 0; i != 24; i++) TextDrawHideForPlayer(playerid, CircularMenu[i]);
			//SendClientMessage(playerid, -1, "");
		}
	}
	return 1;
}
Reply
#2

How did you declare it?

For example (I don't know how it's declared):
pawn Код:
switch(clickedid == CircularMenu[0])
must be indexed means that needs [] after.
Reply
#3

Not Work Konstantinos

Text:CircularMenu[26];
Reply
#4

Sorry, I didn't see switch at all. I thought it was if statement.

pawn Код:
if(clickedid == CircularMenu[0/* your number here you want, and remove 0 */])
PS: AntiDeAMX is not necessary to be added in every callback. One is just fine.
Reply
#5

Not Work

pawn Код:
new Text:CircularMenu[24];
pawn Код:
CircularMenu[0] = TextDrawCreate(239.882873, 123.666664, "hud:radardisc");
    TextDrawLetterSize(CircularMenu[0], 0.000000, 0.000000);
    TextDrawTextSize(CircularMenu[0], 79.180084, 97.416824);
    TextDrawAlignment(CircularMenu[0], 1);
    TextDrawColor(CircularMenu[0], -65436);
    TextDrawSetShadow(CircularMenu[0], 0);
    TextDrawSetOutline(CircularMenu[0], 0);
    TextDrawFont(CircularMenu[0], 4);
    TextDrawSetProportional(CircularMenu[0], 1);
    CircularMenu[1] = TextDrawCreate(239.477310, 314.833221, "hud:radardisc");
    TextDrawLetterSize(CircularMenu[1], 0.000000, 0.000000);
    TextDrawTextSize(CircularMenu[1], 77.774520, -97.999885);
    TextDrawAlignment(CircularMenu[1], 1);
    TextDrawColor(CircularMenu[1], -156);
    TextDrawSetShadow(CircularMenu[1], 0);
    TextDrawSetOutline(CircularMenu[1], 0);
    TextDrawFont(CircularMenu[1], 4);
    CircularMenu[2] = TextDrawCreate(392.746978, 315.249847, "hud:radardisc");
    TextDrawLetterSize(CircularMenu[2], 0.000000, 0.000000);
    TextDrawTextSize(CircularMenu[2], -78.243026, -97.999839);
    TextDrawAlignment(CircularMenu[2], 1);
    TextDrawColor(CircularMenu[2], -156);
    TextDrawSetShadow(CircularMenu[2], 0);
    TextDrawSetOutline(CircularMenu[2], 0);
    TextDrawFont(CircularMenu[2], 4);
    CircularMenu[3] = TextDrawCreate(392.341339, 123.749847, "hud:radardisc");
    TextDrawLetterSize(CircularMenu[3], 0.000000, 0.000000);
    TextDrawTextSize(CircularMenu[3], -74.026344, 96.250259);
    TextDrawAlignment(CircularMenu[3], 1);
    TextDrawColor(CircularMenu[3], -156);
    TextDrawSetShadow(CircularMenu[3], 0);
    TextDrawSetOutline(CircularMenu[3], 0);
    TextDrawFont(CircularMenu[3], 4);
    CircularMenu[4] = TextDrawCreate(303.133666, 114.333343, "hud:radar_gangB");
    TextDrawLetterSize(CircularMenu[4], 0.000000, 0.000000);
    TextDrawTextSize(CircularMenu[4], 28.579788, 28.583330);
    TextDrawAlignment(CircularMenu[4], 1);
    TextDrawColor(CircularMenu[4], -1);
    TextDrawSetShadow(CircularMenu[4], 0);
    TextDrawSetOutline(CircularMenu[4], 0);
    TextDrawFont(CircularMenu[4], 4);
    CircularMenu[5] = TextDrawCreate(353.797363, 144.499923, "hud:radar_LocoSyndicate");
    TextDrawLetterSize(CircularMenu[5], 0.000000, 0.000000);
    TextDrawTextSize(CircularMenu[5], 28.579788, 28.583330);
    TextDrawAlignment(CircularMenu[5], 1);
    TextDrawColor(CircularMenu[5], -1);
    TextDrawSetShadow(CircularMenu[5], 0);
    TextDrawSetOutline(CircularMenu[5], 0);
    TextDrawFont(CircularMenu[5], 4);
    CircularMenu[6] = TextDrawCreate(373.538146, 203.249771, "hud:arrow");
    TextDrawLetterSize(CircularMenu[6], 0.000000, 0.000000);
    TextDrawTextSize(CircularMenu[6], 28.579788, 28.583330);
    TextDrawAlignment(CircularMenu[6], 1);
    TextDrawColor(CircularMenu[6], -1);
    TextDrawSetShadow(CircularMenu[6], 0);
    TextDrawSetOutline(CircularMenu[6], 0);
    TextDrawFont(CircularMenu[6], 4);
    CircularMenu[7] = TextDrawCreate(353.922851, 267.249816, "hud:radar_modGarage");
    TextDrawLetterSize(CircularMenu[7], 0.000000, 0.000000);
    TextDrawTextSize(CircularMenu[7], 28.579788, 28.583330);
    TextDrawAlignment(CircularMenu[7], 1);
    TextDrawColor(CircularMenu[7], -1);
    TextDrawSetShadow(CircularMenu[7], 0);
    TextDrawSetOutline(CircularMenu[7], 0);
    TextDrawFont(CircularMenu[7], 4);
    CircularMenu[8] = TextDrawCreate(303.385620, 293.916442, "hud:radar_qmark");
    TextDrawLetterSize(CircularMenu[8], 0.000000, 0.000000);
    TextDrawTextSize(CircularMenu[8], 28.579788, 28.583330);
    TextDrawAlignment(CircularMenu[8], 1);
    TextDrawColor(CircularMenu[8], -1);
    TextDrawSetShadow(CircularMenu[8], 0);
    TextDrawSetOutline(CircularMenu[8], 0);
    TextDrawFont(CircularMenu[8], 4);
    CircularMenu[9] = TextDrawCreate(248.163009, 268.082946, "hud:radar_enemyAttack");
    TextDrawLetterSize(CircularMenu[9], 0.000000, 0.000000);
    TextDrawTextSize(CircularMenu[9], 28.579788, 28.583330);
    TextDrawAlignment(CircularMenu[9], 1);
    TextDrawColor(CircularMenu[9], -1);
    TextDrawSetShadow(CircularMenu[9], 0);
    TextDrawSetOutline(CircularMenu[9], 0);
    TextDrawFont(CircularMenu[9], 4);
    CircularMenu[10] = TextDrawCreate(229.953643, 201.999679, "hud:radar_dateFood");
    TextDrawLetterSize(CircularMenu[10], 0.000000, 0.000000);
    TextDrawTextSize(CircularMenu[10], 28.579788, 28.583330);
    TextDrawAlignment(CircularMenu[10], 1);
    TextDrawColor(CircularMenu[10], -1);
    TextDrawSetShadow(CircularMenu[10], 0);
    TextDrawSetOutline(CircularMenu[10], 0);
    TextDrawFont(CircularMenu[10], 4);
    CircularMenu[11] = TextDrawCreate(249.694488, 142.333053, "hud:radar_race");
    TextDrawLetterSize(CircularMenu[11], 0.000000, 0.000000);
    TextDrawTextSize(CircularMenu[11], 28.579788, 28.583330);
    TextDrawAlignment(CircularMenu[11], 1);
    TextDrawColor(CircularMenu[11], -1);
    TextDrawSetShadow(CircularMenu[11], 0);
    TextDrawSetOutline(CircularMenu[11], 0);
    TextDrawFont(CircularMenu[11], 4);
    CircularMenu[12] = TextDrawCreate(292.825469, 184.916641, "LD_BEAT:chit");
    TextDrawLetterSize(CircularMenu[12], 0.000000, -6.184477);
    TextDrawTextSize(CircularMenu[12], 54.816955, 68.250015);
    TextDrawAlignment(CircularMenu[12], 1);
    TextDrawColor(CircularMenu[12], -16777016);
    TextDrawUseBox(CircularMenu[12], true);
    TextDrawBoxColor(CircularMenu[12], 255);
    TextDrawSetShadow(CircularMenu[12], 0);
    TextDrawSetOutline(CircularMenu[12], 0);
    TextDrawFont(CircularMenu[12], 4);
    CircularMenu[13] = TextDrawCreate(320.468566, 190.750000, "O");
    TextDrawLetterSize(CircularMenu[13], 1.182299, 5.531667);
    TextDrawAlignment(CircularMenu[13], 2);
    TextDrawColor(CircularMenu[13], -1);
    TextDrawSetShadow(CircularMenu[13], 0);
    TextDrawSetOutline(CircularMenu[13], 0);
    TextDrawBackgroundColor(CircularMenu[13], 51);
    TextDrawFont(CircularMenu[13], 1);
    TextDrawSetProportional(CircularMenu[13], 1);
    CircularMenu[14] = TextDrawCreate(319.594696, 189.999969, "I");
    TextDrawLetterSize(CircularMenu[14], 1.100307, 3.169169);
    TextDrawAlignment(CircularMenu[14], 2);
    TextDrawColor(CircularMenu[14], -1);
    TextDrawSetShadow(CircularMenu[14], 0);
    TextDrawSetOutline(CircularMenu[14], 0);
    TextDrawBackgroundColor(CircularMenu[14], 51);
    TextDrawFont(CircularMenu[14], 1);
    TextDrawSetProportional(CircularMenu[14], 1);
    CircularMenu[15] = TextDrawCreate(318.594940, 128.333297, "_~n~PlayerInfo");
    TextDrawLetterSize(CircularMenu[15], 0.384406, 1.553331);
    TextDrawAlignment(CircularMenu[15], 2);
    TextDrawColor(CircularMenu[15], -256);
    TextDrawSetShadow(CircularMenu[15], 0);
    TextDrawSetOutline(CircularMenu[15], 0);
    TextDrawBackgroundColor(CircularMenu[15], 51);
    TextDrawFont(CircularMenu[15], 3);
    TextDrawSetProportional(CircularMenu[15], 1);
    TextDrawTextSize(CircularMenu[15], 10, 25);
    TextDrawSetSelectable(CircularMenu[15], true);
    CircularMenu[16] = TextDrawCreate(368.321472, 158.499969, "_~n~dni");
    TextDrawLetterSize(CircularMenu[16], 0.384406, 1.553331);
    TextDrawAlignment(CircularMenu[16], 2);
    TextDrawColor(CircularMenu[16], -256);
    TextDrawSetShadow(CircularMenu[16], 0);
    TextDrawSetOutline(CircularMenu[16], 0);
    TextDrawBackgroundColor(CircularMenu[16], 51);
    TextDrawFont(CircularMenu[16], 3);
    TextDrawSetProportional(CircularMenu[16], 1);
    TextDrawTextSize(CircularMenu[16], 10, 25);
    TextDrawSetSelectable(CircularMenu[16], true);
    CircularMenu[17] = TextDrawCreate(387.593963, 216.666610, "_~n~GpsXZero");
    TextDrawLetterSize(CircularMenu[17], 0.384406, 1.553331);
    TextDrawAlignment(CircularMenu[17], 2);
    TextDrawColor(CircularMenu[17], -256);
    TextDrawSetShadow(CircularMenu[17], 0);
    TextDrawSetOutline(CircularMenu[17], 0);
    TextDrawBackgroundColor(CircularMenu[17], 51);
    TextDrawFont(CircularMenu[17], 3);
    TextDrawSetProportional(CircularMenu[17], 1);
    TextDrawTextSize(CircularMenu[17], 10, 25);
    TextDrawSetSelectable(CircularMenu[17], true);
    CircularMenu[18] = TextDrawCreate(367.978881, 279.499938, "_~n~Inventory");
    TextDrawLetterSize(CircularMenu[18], 0.384406, 1.553331);
    TextDrawAlignment(CircularMenu[18], 2);
    TextDrawColor(CircularMenu[18], -256);
    TextDrawSetShadow(CircularMenu[18], 0);
    TextDrawSetOutline(CircularMenu[18], 0);
    TextDrawBackgroundColor(CircularMenu[18], 51);
    TextDrawFont(CircularMenu[18], 3);
    TextDrawSetProportional(CircularMenu[18], 1);
    TextDrawTextSize(CircularMenu[18], 10, 25);
    TextDrawSetSelectable(CircularMenu[18], true);
    CircularMenu[19] = TextDrawCreate(316.972747, 305.583251, "_~n~Info");
    TextDrawLetterSize(CircularMenu[19], 0.384406, 1.553331);
    TextDrawAlignment(CircularMenu[19], 2);
    TextDrawColor(CircularMenu[19], -256);
    TextDrawSetShadow(CircularMenu[19], 0);
    TextDrawSetOutline(CircularMenu[19], 0);
    TextDrawBackgroundColor(CircularMenu[19], 51);
    TextDrawFont(CircularMenu[19], 3);
    TextDrawSetProportional(CircularMenu[19], 1);
    TextDrawTextSize(CircularMenu[19], 10, 25);
    TextDrawSetSelectable(CircularMenu[19], true);
    CircularMenu[20] = TextDrawCreate(262.687164, 279.166534, "_~n~creditos");
    TextDrawLetterSize(CircularMenu[20], 0.384406, 1.553331);
    TextDrawAlignment(CircularMenu[20], 2);
    TextDrawColor(CircularMenu[20], -256);
    TextDrawSetShadow(CircularMenu[20], 0);
    TextDrawSetOutline(CircularMenu[20], 0);
    TextDrawBackgroundColor(CircularMenu[20], 51);
    TextDrawFont(CircularMenu[20], 3);
    TextDrawSetProportional(CircularMenu[20], 1);
    TextDrawTextSize(CircularMenu[20], 10, 25);
    TextDrawSetSelectable(CircularMenu[20], true);
    CircularMenu[21] = TextDrawCreate(245.414825, 215.999923, "_~n~lugares");
    TextDrawLetterSize(CircularMenu[21], 0.384406, 1.553331);
    TextDrawAlignment(CircularMenu[21], 2);
    TextDrawColor(CircularMenu[21], -256);
    TextDrawSetShadow(CircularMenu[21], 0);
    TextDrawSetOutline(CircularMenu[21], 0);
    TextDrawBackgroundColor(CircularMenu[21], 51);
    TextDrawFont(CircularMenu[21], 3);
    TextDrawSetProportional(CircularMenu[21], 1);
    TextDrawTextSize(CircularMenu[21], 10, 25);
    TextDrawSetSelectable(CircularMenu[21], true);
    CircularMenu[22] = TextDrawCreate(261.876098, 155.749923, "_~n~premios");
    TextDrawLetterSize(CircularMenu[22], 0.384406, 1.553331);
    TextDrawAlignment(CircularMenu[22], 2);
    TextDrawColor(CircularMenu[22], -256);
    TextDrawSetShadow(CircularMenu[22], 0);
    TextDrawSetOutline(CircularMenu[22], 0);
    TextDrawBackgroundColor(CircularMenu[22], 51);
    TextDrawFont(CircularMenu[22], 3);
    TextDrawSetProportional(CircularMenu[22], 1);
    TextDrawTextSize(CircularMenu[22], 10, 25);
    TextDrawSetSelectable(CircularMenu[22], true);
    CircularMenu[23] = TextDrawCreate(320.504364, 213.333221, "_~n~_~n~Exit Menu");
    TextDrawLetterSize(CircularMenu[23], 0.384406, 1.553331);
    TextDrawAlignment(CircularMenu[23], 2);
    TextDrawColor(CircularMenu[23], -256);
    TextDrawSetShadow(CircularMenu[23], 0);
    TextDrawSetOutline(CircularMenu[23], 0);
    TextDrawBackgroundColor(CircularMenu[23], 51);
    TextDrawFont(CircularMenu[23], 3);
    TextDrawSetProportional(CircularMenu[23], 1);
    TextDrawTextSize(CircularMenu[23], 10, 25);
    TextDrawSetSelectable(CircularMenu[23], true);
pawn Код:
public OnPlayerClickTextDraw(playerid, Text:clickedid)
{
    AntiDeAMX();
    switch(clickedid == CircularMenu)
    {
        case 15:
        {
         
        }
        case 16: SendClientMessage(playerid, -1, "");
        case 17:
        {
            ShowPlayerDialog(playerid,10001, DIALOG_STYLE_LIST, "", "µЎЕ§", "ВЎаЕФЎ");
        }
        case 18: SendClientMessage(playerid, -1, "");
        case 19:
        {
            SendClientMessage(playerid, -1, "");
            SendClientMessage(playerid, -1, "");
        }
        case 20: SendClientMessage(playerid, -1, "");
        case 21: SendClientMessage(playerid, -1, "");
        case 22: SendClientMessage(playerid, -1, "");
        case 23:
        {
            for(new i = 0; i != 24; i++) TextDrawHideForPlayer(playerid, CircularMenu[i]);
            //SendClientMessage(playerid, -1, "");
        }
    }
    return 1;
}
Reply
#6

pawn Код:
public OnPlayerClickTextDraw(playerid, Text:clickedid)
{
    AntiDeAMX();
    switch(clickedid)
    {
        case 15:
        {

        }
        case 16: SendClientMessage(playerid, -1, "");
        case 17:
        {
            ShowPlayerDialog(playerid,10001, DIALOG_STYLE_LIST, "", "µЎЕ§", "ВЎаЕФЎ");
            //(playerid, dialogid, style, caption[], info[], button1[], button2[])
            // You're missing one parameter
        }
        case 18: SendClientMessage(playerid, -1, "");
        case 19:
        {
            SendClientMessage(playerid, -1, "");
            SendClientMessage(playerid, -1, "");
        }
        case 20: SendClientMessage(playerid, -1, "");
        case 21: SendClientMessage(playerid, -1, "");
        case 22: SendClientMessage(playerid, -1, "");
        case 23:
        {
            for(new i = 0; i != 24; i++) TextDrawHideForPlayer(playerid, CircularMenu[i]);
            //SendClientMessage(playerid, -1, "");
        }
    }
    return 1;
}
Reply
#7

Not Work I can not Clickable.
Reply
#8

Help
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)