SA-MP Forums Archive
Player-specific multi dimensional string array? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Player-specific multi dimensional string array? (/showthread.php?tid=117889)



Player-specific multi dimensional string array? - theRealG - 02.01.2010

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!


Re: Player-specific multi dimensional string array? - dice7 - 02.01.2010

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);
}



Re: Player-specific multi dimensional string array? - theRealG - 02.01.2010

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