12.02.2009, 17:07
Код:
Text:MenuInfo[menuid][T_Row[i]]

I have an error but i don't know if it's because of this
error 028: invalid subscript (not an array or too many subscripts): "T_Row"
Text:MenuInfo[menuid][T_Row[i]]

|
Originally Posted by Rav
I'm a little confused as to what you're trying to do there
|
028 invalid subscript (not an array or too many subscripts): identifier The subscript operators “[” and “]” are only valid with arrays. The number of square bracket pairs may not exceed the number of dimensions of the array.
if (JobPay[ PlayerInfo[playerid][pJob] ] > 100) // random example
|
Originally Posted by 0rb
Of course you can, but:
Код:
028 invalid subscript (not an array or too many subscripts): identifier The subscript operators “[” and “]” are only valid with arrays. The number of square bracket pairs may not exceed the number of dimensions of the array. |
enum MInfo
{
Float:MenuX,
Float:MenuY,
Float:BoxLength,
Rows,
bool:Shown,
bool:UsedMenu,
Text:T_Title,
Text:T_Row1,
Text:T_Row2,
Text:T_Row3,
Text:T_Row4,
Text:T_Row5,
Text:T_Row6,
//...
}
new MenuInfo[F_MAX_MENUS][MInfo];
enum MInfo
{
Float:MenuX,
Float:MenuY,
Float:BoxLength,
Rows,
bool:Shown,
bool:UsedMenu,
Text:T_Title,
Text:T_Row[F_MAX_MENU_ROWS],
}
new MenuInfo[F_MAX_MENUS][MInfo];
|
Originally Posted by Rav
I'd split it into MenuInfo and MenuTextDrawInfo, to avoid those problems
![]() |
MenuInfo[menuid][T_Row][i]