09.10.2016, 22:04
Hi,
I'm trying to make a Accent System but I have some problems with it.
Error: "error 006: must be assigned to an array"
Code:
I'm trying to make a Accent System but I have some problems with it.
Error: "error 006: must be assigned to an array"
Code:
Код:
CMD:sotaque(playerid, params[]) { if(PlayerData[playerid][pSotaque] > 0) { SendErrorMessage(playerid, "Vocк jб possui um sotaque ativo. Use: \"/sotaque nenhum\" para desativar."); } if(strval(params) < 1 || strval(params) > 6) { SendClientMessage(playerid,COLOR_GREY,"SINTAXE: /sotaque [1-6]"); SendClientMessage(playerid,COLOR_GREY,"1 - Paraibano"); SendClientMessage(playerid,COLOR_GREY,"2 - Baiano"); SendClientMessage(playerid,COLOR_GREY,"3 - Pernambucano"); SendClientMessage(playerid,COLOR_GREY,"4 - Goiano"); SendClientMessage(playerid,COLOR_GREY,"5 - Mineiro"); SendClientMessage(playerid,COLOR_GREY,"6 - Gaъcho"); } switch(strval(params)) { case 1: PlayerData[playerid][pSotaque] = "Paraibano"; // ERROR 006 case 2: PlayerData[playerid][pSotaque] = "Baiano"; // ERROR 006 case 3: PlayerData[playerid][pSotaque] = "Pernambucano"; // ERROR 006 case 4: PlayerData[playerid][pSotaque] = "Goiano"; // ERROR 006 case 5: PlayerData[playerid][pSotaque] = "Mineiro"; // ERROR 006 case 6: PlayerData[playerid][pSotaque] = "Gaъcho"; // ERROR 006 } if (!strcmp(params, "nenhum", true)) { PlayerData[playerid][pSotaque] = 0; SendSucessMessage(playerid, "Vocк desativou o seu sotaque."); } return 1; }