You are viewing a single comment's thread from:

RE: Having problems with the code

in #game4 years ago

I was looking through your code and I didn't know I could put use javascript to handle the commands I was using the onClick for. To be honest, I've only been learning js as a hobby so I really appreciate every input you can give me. JS is way different than C++, lol which is the only coding language I've ever learned from a school (high school). The sections with 'tallyMark += #;' for example, I tried that and it didn't work the first time so I switched to the redundant sections of just ++ adding into tallyMark. I really appreciate the help and I hope you continue to help me out as this keeps going. I'm adding in more code and I was curious since you have the tallyMark += #; could I remove the redundant adding into the tallyMark with ++, and removing tallyMark with --?
If you watch lbry, I had posted some videos on there my first day and two about the strange problems I was having, if you wanna have a bit of a laugh. lol

I hope you are feeling better today and keep pushing forward with your health. <3 <3 <3

Sort:  

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.

I just finished looking over your code, and it isn't working past clicking the start button.

I presume that's because it's being actively developed, so I'm going to wait a bit for you to finish before doing any more major changes.

I spent the time I set aside to work on this finding where the syntax error I see in the console is. Removing line 822 (fourth line of learnFight function) allows the user to get past the press start screen.

I'll check back later and hopefully things will be more stable once you're done.

Lots of luck.

Hey non-e-moose, sorry it took me so long to get stuff added into the game. I didn't get to the lore but I added in a townSections and towns. I tried to fix that fighting error. I added in hopefully a difficulty check and monster check but unsure if I did it right. I added in comments to respond to some of your comments & i'm thinking if the difficulty check gets working, then the controls could be streamlined (like you said could most likely be done) to just one set. I added in some way to find player health and mana. I started to add in the fighting functions but got a bit stumped. Thank you again and I hope you are feeling better.

"...I hope you are feeling better."

I didn't mean to give the impression of being ill. I can understand how it would come across that way with my quarantine diary though. That and my general health is a pretty bleak affair, which probably contributes to a tone of unwellness.

In any case, I'm fully 'recovered' to my usual semblance of health.


I'm about to look over your code, but I don't have much time to work on it right this minute. I do have a few changes in mind that will greatly improve it though.

I'm about to change my codepen, and you can check back there for updates over the next couple days. I'll leave a header comment with a rundown of changes and other info.

I'll put in real work on the game in a few handfuls of hours.

Oh okay, that's good to hear about being recovered.

Yeah I was on there earlier or yesterday and saw the check back status.

Okay, I'm looking forward to what you put in, hopefully I can learn more from your skills.

Awe, I was wondering where that issue was. Okay kool, I'll get back on it tonight. I like the passing back and forth idea you mentioned on the other comment. Feel free to add in extra content and such or to rewrite anything you feel is needed. I am going to add in the towns and town setups as well as some lore.

Your history into coding is very extensive. I only took C++ in high school and learned a bit of basic and early python just before that. I never took college courses, I didn't exactly have the grades to get in. Lol

As for the hive info, I will look around and see if I can find some info to help you. The Java hive library sounds pretty kool.

Ttyl, happy coding!