I'm fairly new to VB and I am making a game as part of my portfolio project in a class. I'm having some trouble with array declaration though. Here's my code:
I have option explicit on and option strict on. When I type that second line in the code box, I get "Declaration Expected" in the error box. If I try using the following, I get "Explicit initialization is not permitted for arrays declared with explicit bounds."Code:Public varSkillLearnedArray(100) As Boolean varSkillLearnedArray() = {True,true,true}
This is all within a class. Do I need to declare public arrays outside the class? Because it seems to work fine if I declare them within a sub, but then I can't make them public, of course. Grrr.Code:Public varSkillLearnedArray(100) As Boolean = {True, True, True}
Help!
P.S. I intend to declare one hundred and one "false" values for the variable initially, but I can't even get this to work.![]()


LinkBack URL
About LinkBacks





Reply With Quote


Bookmarks