Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Studio Chat / [SOLVED] nan !!!

Author
Message
Creative Magic Man
11
Years of Service
User Offline
Joined: 14th Nov 2012
Location: Frinton On Sea, Essex, UK
Posted: 2nd Aug 2019 09:46
I have a strange occurrance that I am not sure if it is an Error or some indicator etc.

When a specific error occurs with my 'SetViewOffset' command in my code and I print out the two floating variables (to see what is happening ) to calculate this offset I get 'nan' in place of a floating number.

As this is a floating number I would assume you couldn't get a string for the contents. Unless AppGameKit is trying to tell me something.

My code is way to long to reproduce this Error, but I might try to recreate it with a few lines.
Amazing creations start with a Fuzzy Vision
Dave - Creator, Developer and Visionary
Fuzzy Visions

The author of this post has marked a post as an answer.

Go to answer

Tsung
6
Years of Service
User Offline
Joined: 31st Dec 2017
Location:
Posted: 2nd Aug 2019 12:41
nan means "Not a Number". Is your code trying to do something crazy like divide by zero? ..
Or maybe you are trying to use a variable without defining it properly? or redefining it to something crazy?

I'll guess at divide by zero... (without seeing the source code)



Creative Magic Man
11
Years of Service
User Offline
Joined: 14th Nov 2012
Location: Frinton On Sea, Essex, UK
Posted: 2nd Aug 2019 21:54
Thank's Tsung. At least I know what 'nan' means now. I don't have a problem in AppGameKit Classic so I am thinking it is a variable in the scene generator ( in AppGameKit Studio ) that I haven't accounted for when interacting with my old code.
Amazing creations start with a Fuzzy Vision
Dave - Creator, Developer and Visionary
Fuzzy Visions
Creative Magic Man
11
Years of Service
User Offline
Joined: 14th Nov 2012
Location: Frinton On Sea, Essex, UK
Posted: 2nd Aug 2019 22:50 Edited at: 2nd Aug 2019 22:51
This post has been marked by the post author as the answer.
Yep, it was the old divide by zero mistake made by the numpty programmer. Not Game Creators's fault. Solved
Amazing creations start with a Fuzzy Vision
Dave - Creator, Developer and Visionary
Fuzzy Visions

Login to post a reply

Server time is: 2024-04-18 08:51:01
Your offset time is: 2024-04-18 08:51:01