You are viewing a single comment's thread from:

RE: Having problems with the code

in #game4 years ago

Sorry, I don't watch lbry. I've never even heard of it honestly.

"JS is way different than C++..."

You've got that right. I prefer a strongly typed, compiled language myself. I really like C++. The first language I learned in secondary school was Visual BASIC, followed by C, then on to C++, and Java. After that I had to learn python to start in college and then a bit of JavaScript to make a WebGL graphics engine for an assignment.

"I really appreciate the help and I hope you continue to help me out as this keeps going."

Glad to hear it.

I plan on keeping up. In fact I've been rolling over a few ideas in my mind today. I'll likely check it after writing this, but once you make the next chunk and put it in the repo let me know. I'm going to fork that and make some changes. I'll put it back up on my repo when I'm done, and we can simply keep passing it back and forth building and improving.

"...I tried that and it didn't work..."

JS is not my best language, but I'm pretty sure it was a scope problem. My best guess is that tallyMark was declared in the scope of the JS script element, but you were calling it from the scope of the button element's onclick attribute. Javascript would silently allow you to implicitly declare the value as you use it. Thus you had two (or more because of multiple button onclick usages) tallyMark variables; one in the script element's scope, and one in the individual button element's scope. At least that's the theory that led me to my solution, it might not actually work like that. JS is probably my least favorite language of those that I know.

Still I'll offer my skills to this game.

I've been hitting a snag with my main software project these days. I need to know some of the finer points of how Hive transactions work (since I want to make my own Hive library in Java), but I'm having trouble finding help and information.

This work will help keep my mind fresh and give me some much needed JavaScript practice.