error 033: array must be indexed
#1

im getting these errors :

rpg.pwn(746) : error 033: array must be indexed (variable "Type")
rpg.pwn(746) : error 029: invalid expression, assumed zero
rpg.pwn(746) : warning 215: expression has no effect
rpg.pwn(746) : error 001: expected token: ";", but found "]"
rpg.pwn(746) : fatal error 107: too many error messages on one line


PHP код:
enum Req_info
{
    
rpg[3],
    
m4[3]
};
new 
RequestItem[MAX_PLAYERS][Req_info];
CMD:accept(playerid,params[])
{
    new 
ID,Type[16],string[256];
    if(
sscanf(params,"s[16]d",Type,ID))
    {
        
SendClientMessage(playerid,COLOR_ERROR,"Use : /accept type[rpg] playerid");
        return 
1;
    }
    if(
RequestItem[ID][Type][0] != playerid) return SendClientMessage(playerid,COLOR_ERROR,"You have not any request."); //Line 746 
Reply
#2

You can't use a string as an array index.
Reply
#3

Quote:
Originally Posted by Vince
Посмотреть сообщение
You can't use a string as an array index.
Thanks
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)