Problem with Arrays
I am trying to make a skin menu so players can buy skins from points they've gained from killing others and I put everything in an array but I get an error.
This is the code. Code:
enum _:SkinInfoCode:
g_iSkins = ArrayCreate(SkinInfo);Error: Invalid subscript (not an array or too many subscripts): "SkinOwned" on line 145 I don't know what the problem is and any help would be appreciated. |
Re: Problem with Arrays
PHP Code:
PHP Code:
|
Re: Problem with Arrays
The array SkinOwned is supposed to store 0 if not owned and 1 if owned for people in the server. I don't get how that will work.
|
Re: Problem with Arrays
g_ states that it is global yet you create it using new.
|
Re: Problem with Arrays
Does name of a variable really matter?
|
Re: Problem with Arrays
It matters for those of us who are trying to help you because it becomes confusing.
And to get the correct value your actually looking for if( g_iSkinsInfo[ SkinOwned ][ id ] == 0 ) |
Re: Problem with Arrays
Thanks it worked.
|
| All times are GMT -4. The time now is 13:12. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.