Array trouble - 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)
+--- Thread: Array trouble (
/showthread.php?tid=297645)
Array trouble -
Whizion - 16.11.2011
pawn Код:
main()
{
new Ranks[3][7][] =
{
{{"Nothing\t"},{"Nothing\t"},{"Nothing\t"},{"Nothing\t"},{"Nothing\t"},{"Nothing\t"},{"Nothing\t"}},
{{"Nothing\t"},{"Cadet\t"},{"Officer"},{"Corporal"},{"Sergeant"},{"Lieutenant"},{"Chief\t"}},
{{"Nothing\t"},{"Outsider"},{"Associate"},{"Soldier"},{"Capo\t"},{"Underboss"},{"Godfather"}}
};
printf("Ranks[2][6] = %s", Ranks[2][6]);
}
The code should print: '
Ranks[2][6] = Godfather' but it doesn't, it prints '
Ranks[2][6] = ther'.
What did i do wrong, please help.
Thank you.
Re: Array trouble -
Whizion - 17.11.2011
Thanks, but unfortunately it didn't work, i gave up on it... i made this using switch.
It's slower.. but at least it works.