may i do this?
#1

Код:
Text:MenuInfo[menuid][T_Row[i]]
is it right to place []'s inside a [.. here .. ]


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"
Reply
#2

I'm a little confused as to what you're trying to do there
Reply
#3

Quote:
Originally Posted by Rav
I'm a little confused as to what you're trying to do there
but that doesn't really matter, i just need to know if i may do this in pawno
Reply
#4

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.
Reply
#5

you can do it in a statement, like this

Код:
if (JobPay[ PlayerInfo[playerid][pJob] ] > 100) // random example
what you can't do is what you posted, declaring a variable like that
Reply
#6

He don't declare it
Reply
#7

Quote:
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.
than how do i need to do this? :S

i need to have more than 1 textdraw
i could do:

Код:
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];
that'll work than, but to make it easier, i thought this:

Код:
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];
but than i get that error
Reply
#8

I'd split it into MenuInfo and MenuTextDrawInfo, to avoid those problems
Reply
#9

Quote:
Originally Posted by Rav
I'd split it into MenuInfo and MenuTextDrawInfo, to avoid those problems
ok I'll try that
Reply
#10

Ok i've misread your first post anyway.

It's:
pawn Код:
MenuInfo[menuid][T_Row][i]
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)