Player-specific multi dimensional string array?
#1

Hey there,

wondered whether it's possible to create "player specific" multidimensional string arrays.

As an example which doesn't work but to get you an idea of what I mean:

new strings[playerid][playerstrings];

enum playerstrings{
string[5][128]
};

(Fuck the syntax errors, that's just to get you an idea of what I mean)

The aim is that you can call different strings like:
string[playerid][string][0]
string[playerid][string][1]
string[playerid][string][2]
and so on... without having a damn non dynamic way, creating each time a new one like:

string[playerid][string1];
string[playerid][string2];

Does anyone know how to code that?

Thanks for help,

regards!
Reply
#2

PAWN is limited to 3d arrays only. You can only go this far

pawn Код:
enum playerstrings
{
    string[128]
};
new strings[MAX_PLAYERS][playerstrings];
main()
{
    new playerid = 0;
    strcat(strings[playerid][string], "String", 128);
}
Reply
#3

Alright, thanks man... another reason to hate this kiddo language
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)