03.05.2016, 19:59
I get this, maybe you can help me out, thanks in advance.
Код:
./includes/OnDialogResponse.pwn(18835) : error 033: array must be indexed (variable "-unknown-") ./includes/OnDialogResponse.pwn(18875) : error 033: array must be indexed (variable "-unknown-")
PHP код:
if(dialogid == DIALOG_CAR_RADIO)
{
if(response)
{
switch(listitem)
{
case 0:
{
switch(PlayerVehicleInfo[GetPlayerVehicleID(playerid)][pvRadio]) line 18835
{
case 0:
{
new list[520];
for(new i; i != sizeof(radiochannels); i++)
{
if(isnull(list))
{
format(list, sizeof(list), "%s\n", radiochannels[i][rName]);
}
else
{
format(list, sizeof(list), "%s%s\n", list, radiochannels[i][rName]);
}
}
ShowPlayerDialog(playerid, DIALOG_CAR_SELECTRADIO, DIALOG_STYLE_LIST, "{FF9900}Vehicle", list, "Play", "Cancel");
}
default:
{
new veh = GetPlayerVehicleID(playerid),
msg[65];
format(PlayerVehicleInfo[veh][pvRadio], 200, "%s", EOS);
format(msg, sizeof(msg), "** > %s turns the vehicle's radio off.", GetPlayerNameEx(playerid));
SendClientMessage(playerid, COLOR_PINK, msg);
strdel(msg, 3, 4);
SetPlayerChatBubble(playerid, msg, COLOR_PINK, 12.0, 10000);
foreach(new i : Player)
{
if(GetPlayerVehicleID(i) == veh)
{
StopAudioStreamForPlayer(i);
}
}
}
}
}
case 1:
{
switch(PlayerVehicleInfo[GetPlayerVehicleID(playerid)][pvRadio]) line 18875
{
case 0:
{
SendClientMessage(playerid, COLOR_GREY, "You cannot switch the station as the radio is currently turned off.");
ShowPlayerDialog(playerid, DIALOG_CAR_RADIO, DIALOG_STYLE_LIST, "{FF9900}Vehicle", "Toggle Radio\nSwitch Station\nUse extern URL", "Select", "Cancel");
}
default:
{
new list[520];
for(new i; i != sizeof(radiochannels); i++)
{
if(isnull(list))
{
format(list, sizeof(list), "%s\n", radiochannels[i][rName]);
}
else
{
format(list, sizeof(list), "%s%s\n", list, radiochannels[i][rName]);
}
}
ShowPlayerDialog(playerid, DIALOG_CAR_SELECTRADIO, DIALOG_STYLE_LIST, "{FF9900}Vehicle", list, "Play", "Cancel");
}
}
}
case 2:
{
ShowPlayerDialog(playerid, DIALOG_CAR_RADIOLINK, DIALOG_STYLE_INPUT, "{FF9900}Vehicle", "Enter the URL of your radio channel/song:", "Submit", "Cancel");
}
}
}
}