Help error: initialization data exceeds declared size
#1

PHP код:
enum enum_Itens
{
    
item_Id,
     
item_Type,
      
item_Model,
     
item_Name[24],
    
item_Limit,
    
bool:item_Candrop,
    
bool:item_CanUse,
    
item_Information[200]
}
new 
Itens[][enum_Itens] =
{
  
//ID    Type                     Model       Name                   Limit   CanDrop  CanUse  Information
    
{0,   ITEM_TYPE_NORMAL,        19382,      "Emepty",              "0",    false,   false,  "N/A"}, // Line 63
    
{1,   ITEM_TYPE_NORMAL,        11738,      "Med Kit",             "1",    true,    true,   "~>~ Bla bla."}, // Line 64
    
{2,   ITEM_TYPE_WEAPON,        348,        "Desert Eagle",        "1",    true,    true,   "~>~ Bla bla 3"// Line 65
}; 
Код:
./Source/Players/Inventory.pwn(63) : warning 228: length of initialler exceeds size of the enum field
./Source/Players/Inventory.pwn(63) : error 018: initialization data exceeds declared size
Help me
Reply
#2

Quote:
Originally Posted by ******
Посмотреть сообщение
Why are the limits strings?
I think item_Information[200] ?
Reply
#3

Quote:
Originally Posted by Libbyphay
Посмотреть сообщение
I think item_Information[200] ?
No. You have item_limits as a variable which isn't an array. You can't use string for item_limits so
"1" in your limits should just be 1
Reply
#4

Quote:
Originally Posted by Rufio
Посмотреть сообщение
No. You have item_limits as a variable which isn't an array. You can't use string for item_limits so
"1" in your limits should just be 1
PHP код:
new Itens[][enum_Itens] = 

  
//ID    Type                     Model       Name                   Limit   CanDrop  CanUse  Information 
    
{0,   ITEM_TYPE_NORMAL,        19382,      "Emepty",              0,    false,   false,  "N/A"}, // Line 63 
    
{1,   ITEM_TYPE_NORMAL,        11738,      "Med Kit",             1,    true,    true,   "~>~ Bla bla."}, // Line 64 
    
{2,   ITEM_TYPE_WEAPON,        348,        "Desert Eagle",        1,    true,    true,   "~>~ Bla bla 3"// Line 65 
}; 
OMG thanks you it working +rep for you.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)