Enum Array String Help
#1

Код:
enum test
{
     testvar,
     testtext[6][32]
}
how can i use testtext? Thats codes giving error
Reply
#2

this is a snippet from my server:

Quote:

enum e_pInfo
{
pUserid,
}
new g_PlayerInfo[MAX_PLAYERS][e_pInfo],

you can then access it using g_PlayerInfo[playerid][pUserid]

You could just change this code to fit your own uses of course playerid probably won't be necessary if it isn't user data.
Reply
#3

Код:
enum test
{
     testvar,
     testtext[32]
}
new Something[MAX_PLAYERS][Enum name which is test]

What you can't do is :
Something[MAX_PLAYERS][testtext] ="....."
because Enums are not arrays.
you can use strmid or format I think to insert text in it.
Or 
new testtext[6][32];
testtext[0..5]="Working";
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)