Student with a Sunday deadline, i am trying to put another monster in an already existing mini game bu |
Student with a Sunday deadline, i am trying to put another monster in an already existing mini game bu |
thatwolfgirl2109 |
Nov 4 2016, 01:18 PM
Post
#1
|
Group: Members Posts: 2 Joined: 4-November 16 Member No.: 24,914 |
i am trying to put another monster in an already existing mini game but ...well I'm very new at this and my teacher has stopped helping me..I feel like i did something very wrong and was hoping someone could look over it and tell me what i need to do in order for it to actually work. So far i got the monster to show up but now the ship wont move and my monster wont move ether. If anyone can help please do i would be extremely grateful. Unfortunately i can only send the code because the site will not let me send all of the pictures and fonts that go along with it.
Attached File(s) oknow.html ( 13.77k ) Number of downloads: 390 |
Christian J |
Nov 4 2016, 02:16 PM
Post
#2
|
. Group: WDG Moderators Posts: 9,656 Joined: 10-August 06 Member No.: 7 |
You browser's developer tools should flag some javascript errors, first try to fix those. For example, when the page is loaded I get an error that "squidRow" is not defined.
|
thatwolfgirl2109 |
Nov 4 2016, 09:11 PM
Post
#3
|
Group: Members Posts: 2 Joined: 4-November 16 Member No.: 24,914 |
|
pandy |
Nov 4 2016, 09:23 PM
Post
#4
|
🌟Computer says no🌟 Group: WDG Moderators Posts: 20,730 Joined: 9-August 06 Member No.: 6 |
You use a variable without first defining what it stands for.
Here's the first occurrence. CODE //push the corresponding direction into the validDirections array if(squidRow > 1) It's like if I asked you what x + 2 is without giving you any information about what x is and expect you to be able to answer. This will give you the same error as your script does. CODE alert(x + 2); While this gives you the answer. CODE var x = 2; alert(x + 2); |
Lo-Fi Version | Time is now: 23rd April 2024 - 11:01 PM |