The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> 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: 142
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Nov 4 2016, 02:06 PM
Post #2


Don't like donuts. Don't do MySpace.
********

Group: WDG Moderators
Posts: 17,772
Joined: 9-August 06
Member No.: 6



Seems to be a JavaScript matter, so I move the thread to the Client side scripting forum.

And... could you upload the images too so we can play? happy.gif
It would make it easier to follow what happens too.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Nov 4 2016, 02:07 PM
Post #3


Don't like donuts. Don't do MySpace.
********

Group: WDG Moderators
Posts: 17,772
Joined: 9-August 06
Member No.: 6



Well, that didn't work. Seems like another moderator beat me to it. biggrin.gif
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Christian J
post Nov 4 2016, 02:16 PM
Post #4


.
********

Group: WDG Moderators
Posts: 7,736
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 #5





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 #6


Don't like donuts. Don't do MySpace.
********

Group: WDG Moderators
Posts: 17,772
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

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: 11th December 2017 - 05:42 PM