Issues with three dimensional array
#1

Hey,

I am having some very strange issues with a 3D array that I have. The ranks are loaded from a database, to start out and test with I have the following ranks:



I am however getting a really weird issue, only the latest rank seems to work fine while the rest of the ranks are prefixing themselves 1 by 1 going up with the first character from the rank below (and some unrecognizeable characters).

Here's the console log:

https://pastebin.com/BKb5c5BQ

And here are all the functions I use:

https://pastebin.com/zsRWi9sT

Also, here's what I use to print the loaded ranks afterwards (from a testing command):

Код:
case _H<print_rank>:
		{
			LOG_DEBUG_F("Starting group ranks print, initialized by %s(%s)", PlayerName(playerid), PlayerIP(playerid));
			for (new i = 0; i < sizeof(groupSpawns); i++)
			{
				for (new x = 1; x < MAX_GROUP_RANKS; x++)
				{
					if (strlen(groupRanks[i][x][1]) > 1)
					{
						LOG_DEBUG_F("Group %s(%d) - rank %s(%d)", groupSpawns[i][grSpawn_name], i, groupRanks[i][x][1], x);
					}
				}
			}
		}

How I create the array:

new groupSpawns[MAX_GROUPS][E_CUSTOM_GROUP_SPAWN],
	groupRanks[MAX_GROUPS][MAX_GROUP_RANKS][2];
MAX_GROUP_RANKS is equal to 12.

I have never experienced an issue quite like this and I have no idea why this is happening, does anyone have an idea?

Thank you, I appreciate any help.
Reply


Messages In This Thread
Issues with three dimensional array - by CXdur - 04.04.2017, 18:50
Re: Issues with three dimensional array - by Vin Diesel - 04.04.2017, 19:56
Re: Issues with three dimensional array - by CXdur - 04.04.2017, 20:02
Re: Issues with three dimensional array - by CXdur - 04.04.2017, 20:20

Forum Jump:


Users browsing this thread: 1 Guest(s)