shado360 Posted March 6, 2011 Author Share Posted March 6, 2011 Hello there, forums! Ok, so I have a problem with this code:>! > Private Sub HScroll1_Change()> Dim RUN_SPEED As Byte> modConstants.RUN_SPEED = 6> End Sub> > Private Sub HScroll2_Change()> Dim WALK_SPEED As Byte> Label3.Caption = HScroll2.Value> modConstants.WALK_SPEED = 4> End Sub This is the error I am getting:>! ![](http://www.freemmorpgmaker.com/files/imagehost/pics/b39a1ffbc4ce493af68119891fc58d94.jpg)Any Ideas?Thanks,Païn Link to comment Share on other sites More sharing options...
Genaga Posted March 6, 2011 Share Posted March 6, 2011 WALK_SPEED is a constant. Meaning its constantly the default value it is set when declared. You can not change it. Link to comment Share on other sites More sharing options...
shado360 Posted March 6, 2011 Author Share Posted March 6, 2011 Then how would I go about changing the player's run and walk speeds without changing those? Link to comment Share on other sites More sharing options...
Robin Posted March 6, 2011 Share Posted March 6, 2011 By making it a variable. Link to comment Share on other sites More sharing options...
shado360 Posted March 6, 2011 Author Share Posted March 6, 2011 How would I do that? :/ Sorry I'm a newb :( Link to comment Share on other sites More sharing options...
Ruins of Hell Posted March 6, 2011 Share Posted March 6, 2011 Public Const Var As Byteto:Public Var As Byte Link to comment Share on other sites More sharing options...
shado360 Posted March 6, 2011 Author Share Posted March 6, 2011 It doesn't say Public Const Var As Byte, it only says Public Const As Byte :P Link to comment Share on other sites More sharing options...
Robin Posted March 6, 2011 Share Posted March 6, 2011 Replace 'var' with the name of the variable… Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now