View Full Version : Dice game type error
03-07-2012, 02:59 PM
everything in this dice rolling game is fine until line 69 where i get TypeError:actuals[i] undefined. Any help would be appreciated.
03-07-2012, 04:11 PM
I ran it twice,
first I got an error "unable to get the value of property dblnum"
second time "unable to get the value of property selection"
FWIW I entered into the same sequence both times: 2players, first player bet selection 3 $20, second player bet selection 4 $20
03-07-2012, 06:09 PM
To start, the line numbers from your pastebin are not the same as in your post, line69 has no mention of "actuals[i]". The following comments are based on the line numbers from the pastebin code at it's current state.
You have called actuals[i] outside of your for loop.
You start your loop on line69 and close your loop on line78, then you call actuals several more times in a series of conditional tests.
Move the closing bracket on line78 to line100 to completely encapsulate all code that tests values on all elements in actuals
Doing so has also eliminated the other error messages that I received while running your code.
Powered by vBulletin® Version 4.2.2 Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.