04.04.2016, 22:19
Here's the problem, I am trying to loop through a 50 slot 3D Dimensional array, check which slot has no text [empty string] & save a string in it, them loop once again and save a 2nd string, etc.
The first string works fine, however when I try to save a second string into the array, it sends me an error that after looping through the 50 slot, they're all used even tho I only used one.
Here's the code
It works fine first time, but for the 2nd time, I get the error.
The first string works fine, however when I try to save a second string into the array, it sends me an error that after looping through the 50 slot, they're all used even tho I only used one.
Here's the code
Код:
new TheArray[MAX_PLAYERS][50][128]; for(new i = 0; i < 50; i++) { if(strlen(TheArray[giveplayerid][i]) < 1) { strmid(TheArray[giveplayerid][i], inputtext, 0, 128); return 1; } else { SCM(playerid, COLOR_GREY, "ERROR: ERROR MESSAGE"); return 1; } } return 1;