The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

> Student with a Sunday deadline, i am trying to put another monster in an already existing mini game bu
thatwolfgirl2109
post 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)
Attached File  oknow.html ( 13.77k ) Number of downloads: 390
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
 
Reply to this topicStart new topic
Replies
Christian J
post 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.


User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
thatwolfgirl2109
post Nov 4 2016, 09:11 PM
Post #3





Group: Members
Posts: 2
Joined: 4-November 16
Member No.: 24,914



QUOTE(Christian J @ Nov 4 2016, 02:16 PM) *

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.


Ya but i dont know what undefined means...that is my biggest problem
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post 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);
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Posts in this topic


Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 23rd April 2024 - 11:01 PM