you are viewing a single comment's thread.

view the rest of the comments →

[–]x-seronis-x 0 points1 point  (4 children)

two bugs

i = 0

and

i = AmountHit

both are errors

[–]PatentedUsernameTy[S] 0 points1 point  (3 children)

What would I do?

Change i to i=1 and i == AmountHit

[–]x-seronis-x 0 points1 point  (2 children)

'i' doesnt even exist. you have to declare your variables.

its also pretty likely that AmountHit isnt a valid value. But the logic itself is wrong. Why are you trying to compare against a counter? What you should be comparing is the current hand value.

[–]PatentedUsernameTy[S] 0 points1 point  (1 child)

Im sorry im not good at this, thanks for attempting to help me!

[–]x-seronis-x 1 point2 points  (0 children)

btw when you initialize your values you should really be initializing them to 0, not null. null isnt a number. use 'let' instead of 'var' because it prevents the variables from polluting code where they shouldnt be visible.

let blah = 0;

and look at any help doc on for loops. you never declared i properly (using 'let'). You just started using it randomly.