Multi-dimensional Arrays format
I have this declared as global var:
Code:
And I'm trying to format.. but smthing it's wrong. What am I doing wrong?.. Code:
I used this to display the string on the screen so I can see where the problem is.. Code:
|
Re: Multi-dimensional Arrays format
I don't think (actually i'm 100% sure) you need such an array for what you do...
Anyway, try charsmax(g_playerReady[][]) |
Re: Multi-dimensional Arrays format
Quote:
Anyway.. it work'd, thanks. |
Re: Multi-dimensional Arrays format
I agree with Connor, there is a better way.
|
Re: Multi-dimensional Arrays format
Quote:
Tell us what exactly you're trying to accomplish instead of how to do what you think is best. |
Re: Multi-dimensional Arrays format
Btw, reason for why it was only displaying two characters was because your charsmax(g_playerReady[]) is reading the second size of the array g_playerReady[33][2][32] (ie. 2)
And as for the others' comments about doing it "better", you most likely don't need even need this array. You should only have one array for the players' ready state. You can then use "Unready" and "Ready" instead based on their ready state. You also don't really need to store players' names in the array, and should instead just directly get their name in the function. Those are based on assumptions, but obviously there would be rare cases where you are doing it correctly. |
| All times are GMT -4. The time now is 14:22. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.