Author Topic: RoboNinja  (Read 6479 times)

bluemonkmn

  • SGDK Author
  • Administrator
  • Fanatic
  • *****
  • Posts: 2761
    • ICQ Messenger - 2678251
    • MSN Messenger - BlueMonkMN@gmail.com
    • View Profile
    • http://sgdk2.sf.net/
    • Email
Re: RoboNinja
« Reply #15 on: 2006-08-15, 05:41:41 AM »
You need to put "Option Explicit" at the top of your script to force you to declare variables before you try to use them.  Then you also need to initialize "Target" and "ninja" since you never set those variables to anything befor trying to use them as if they were variables representing sprites.

durnurd

  • Lead Lemming
  • Expert
  • Fanatic
  • *****
  • Posts: 1234
  • Games completed so far: 0
    • MSN Messenger - durnurd@hotmail.com
    • View Profile
    • Find My Ed
Re: RoboNinja
« Reply #16 on: 2006-08-15, 06:34:13 AM »
Also, AngleRadians is always reset to 0 when the script is called, and then updated after it is used, and the updated value is not used before it's lost.  I think you need to declare AngleRadians in a global scope.
Edward Dassmesser

bat

  • Fanatic
  • ***
  • Posts: 234
  • Cheak out the B*t project
    • MSN Messenger - ethanbatmay@hotmail.com
    • Yahoo Instant Messenger - ethanbatmay
    • View Profile
    • The B*t project
    • Email
Re: RoboNinja
« Reply #17 on: 2006-08-22, 02:43:54 PM »
whoa... so thats all it was?  thanks!  ;D
~bat

bat

  • Fanatic
  • ***
  • Posts: 234
  • Cheak out the B*t project
    • MSN Messenger - ethanbatmay@hotmail.com
    • Yahoo Instant Messenger - ethanbatmay
    • View Profile
    • The B*t project
    • Email
Re: RoboNinja
« Reply #18 on: 2006-08-25, 12:30:12 AM »
You need to put "Option Explicit" at the top of your script to force you to declare variables before you try to use them.  Then you also need to initialize "Target" and "ninja" since you never set those variables to anything befor trying to use them as if they were variables representing sprites.
how do you declare/initialize variables in VB? and is there a command that "grabs" a sprite that is not your main character and lets you use it as a variable?
~bat