11.10.2009, 14:06
Hi there, today I encountered something which I consider to be just plain stupid, and that is, when trying to declare an array like arrPlayer[ x ][ x ].
Well, the thing is, if I declare it like arrPlayer[3][ x ] it works out just fine, but, if I declare more than 3, like arrPlayer[96][ x ], it simply stops the execution while trying to declare it.
Here is a bit of my code so you guys can see clearly what I'm talking about:
And it only prints out the first printf: [05:43:30] OnPlayerLogin(Get Char): SELECT * FROM characters WHERE id = 1 LIMIT 1
It does indeed fetch the formatted row and all but it just stops when declaring that array.
What can I be missing here?
Thanks in advance.
Well, the thing is, if I declare it like arrPlayer[3][ x ] it works out just fine, but, if I declare more than 3, like arrPlayer[96][ x ], it simply stops the execution while trying to declare it.
Here is a bit of my code so you guys can see clearly what I'm talking about:
Код:
format(query, sizeof(query), "SELECT * FROM characters WHERE id = %d LIMIT 1", UserInfo[playerid][uChar]); printf("OnPlayerLogin(Get Char): %s", query); mysql_query(query); mysql_store_result(); if (mysql_fetch_row_format(resultline, "|")) { new arrPlayer[96][256]; split(resultline, arrPlayer, '|'); printf("%d", sizeof(arrPlayer)); CharInfo[playerid][pID] = strval(arrPlayer[0]); CharInfo[playerid][pUserID] = strval(arrPlayer[1]); And so on...
It does indeed fetch the formatted row and all but it just stops when declaring that array.
What can I be missing here?
Thanks in advance.