Author Topic: Trying to normalise zero-length Vector3f  (Read 4388 times)

Pilchard123

  • Tester
  • Old Oak
  • ****
  • Thank You
  • -Given: 4
  • -Receive: 24
  • Posts: 932
  • Eufloria: Yes
Trying to normalise zero-length Vector3f
« on: July 18, 2010, 08:21:53 PM »
What?

As far as I know, I haven't done anything that even mentions lengths, zero or otherwise, and also haven't used vectors. Yet the message

Quote
Unable to load level "Resources/Maps/Rallypoint Test" due to the following error: Trying to normalize a zero-length Vector3f

Help?

w4tc

  • Achiever
  • Shrub
  • ****
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 170
Re: Trying to normalise zero-length Vector3f
« Reply #1 on: July 18, 2010, 08:45:14 PM »
I had just that, but I had a mistake, that was the setting of
Code: [Select]
Globals.G.Asteroids=()
I have 12 andI had accidentally set 16 and that wrong
so I have to change it to 12

Pilchard123

  • Tester
  • Old Oak
  • ****
  • Thank You
  • -Given: 4
  • -Receive: 24
  • Posts: 932
  • Eufloria: Yes
Re: Trying to normalise zero-length Vector3f
« Reply #2 on: July 18, 2010, 08:49:33 PM »
Ah...that would possibly be the problem. I hadn't put in any global stuff. Oops.

EDIT: Works now. I feel ever so slightly stupid now...

annikk.exe

  • Achiever
  • Ent
  • ****
  • Thank You
  • -Given: 0
  • -Receive: 4
  • Posts: 1,809
Re: Trying to normalise zero-length Vector3f
« Reply #3 on: July 19, 2010, 07:12:09 AM »
Hot Tip: It's easiest if you just always set Globals.G.Asteroids=(0)

It doesn't matter if you actually have 12, or 16, or 50 asteroids... if you set the global to zero, all it means is that the game won't try to auto-add any asteroids.  That's all that command does.

w4tc

  • Achiever
  • Shrub
  • ****
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 170
Re: Trying to normalise zero-length Vector3f
« Reply #4 on: July 19, 2010, 07:25:13 AM »
Hot Tip: It's easiest if you just always set Globals.G.Asteroids=(0)

It doesn't matter if you actually have 12, or 16, or 50 asteroids... if you set the global to zero, all it means is that the game won't try to auto-add any asteroids.  That's all that command does.

I just tried Globals.G.Asteroids=(0) but i gote a error
I will translate it for you
can level (0) not load because of the following error:
Object reference not set to an instance of an object

annikk.exe

  • Achiever
  • Ent
  • ****
  • Thank You
  • -Given: 0
  • -Receive: 4
  • Posts: 1,809
Re: Trying to normalise zero-length Vector3f
« Reply #5 on: July 19, 2010, 07:35:00 AM »
Was that the only change you made?

Usually just a typo or something.  It means you are referring to something that doesn't exist.  For example, GetAsteroid(8) when you only have 5 asteroids.  Were you previously relying on the game to create some of the asteroids randomly for you?

w4tc

  • Achiever
  • Shrub
  • ****
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 170
Re: Trying to normalise zero-length Vector3f
« Reply #6 on: July 19, 2010, 07:45:11 AM »
yes i have only change Globals.G.Asteroids=(0) ( from 16 to 0 )
Hmm just tried on a othere test level of me and i set Globals.G.Asteroids=(0) and its working xD

so it indeed a other error

that came from this http://www.dyson-game.com/smf/index.php?topic=774.msg5535#msg5535
i had change there that globals.g.asteroid to 0
but there is something wrong... you will read it if you see that put