31.07.2014, 17:20
i've made a dialog but when i compile it i get that error
This is the script
any idea what does that mean ?
Код:
C:\Documents and Settings\Propriйtaire\Bureau\San Andreas Miultiplayer Folders\LASF- Roleplay\gamemodes\bc.pwn(4467) : error 033: array must be indexed (variable "inputtext") C:\Documents and Settings\Propriйtaire\Bureau\San Andreas Miultiplayer Folders\LASF-Roleplay\gamemodes\bc.pwn(4468) : error 033: array must be indexed (variable "inputtext") Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 2 Errors.
Код:
if(dialogid == 8)
{
if(response)
switch(listitem)
{
case 0: //bait
{
if(PlayerInfo[playerid][Money] <= 250) return SCM(playerid, COLOR_GREY,"You dont have enough money on you");
ShowPlayerDialog(playerid, 14,DIALOG_STYLE_INPUT,"Ammount","How much bait you want to buy(1-20 max)","Select","Return");
}
case 1: //Fishing Rod
{
if(PlayerInfo[playerid][Money] <= 500) return SCM(playerid, COLOR_GREY,"You dont have enough money on you");
GivePlayerMoney(playerid, -500);
PlayerInfo[playerid][Money] -= 500;
SendClientMessage(playerid,COLOR_YELLOW,"You have bought a fishing rod.");
PlayerInfo[playerid][FishingRod] ++;
}
}
}
if(dialogid == 14)
{
if(!response) return ShowPlayerDialog(playerid, 8, DIALOG_STYLE_LIST,"{FEFEFE}Fishing Store","Bait $250\nFishing Rod $500","Select","Cancel");
if(response)
{
new str[256],ammount;
format(str,sizeof(str),"You have bought %i from the fishing store", inputtext);
SendClientMessage(playerid,COLOR_YELLOW,str);
PlayerInfo[playerid][Bait] == inputtext; //<---- in this line
ammount = inputtext * 12.5; // <----------- and this line too
GivePlayerMoney(playerid, -ammount);
PlayerInfo[playerid][Money] -= ammount;
}
}
return 1;
}


and thanks BlackM as well. it's fixed now, +REP both of you
?