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 / 48:Error: Invalid floating point number "100.0f"

Author
Message
lesduffy
User Offline
Joined: 4th Aug 2019
Location:
Posted: 11th Sep 2019 03:27
I started a new project, and all I want to do is learn how to create a simple scene, and then include it in my code and have it appear when I start my project. My scene has one simple image that I dragged onto it. The scene is called "MainScene1"

When I try to compile, I see a message saying: MainScene1.scene 48:Error: Invalid floating point number "100.0f and then "Compilation failed"

When I click on the error it takes me to the code in the scene, which is: fMul = percent / 100.0f

I haven't tried to edit this code. It was auto generated so I don't know what I did wrong. My code in main.agc is as follows:

#include "MainScene1.scene"
MainScene1_setup()

do
MainScene1_sync()
Print(ScreenFPS())
Sync()
loop

There's some auto-generated stuff above that which I didn't bother to show such as setting up the screen etc.

Any ideas? Thanks.
BHoltzman
17
Years of Service
User Offline
Joined: 29th Aug 2002
Location:
Posted: 11th Sep 2019 04:32
If it's possible for you to post your project file, I'd be interested in taking a look at it. I don't know if I'll be able to help, but who knows?
lesduffy
User Offline
Joined: 4th Aug 2019
Location:
Posted: 11th Sep 2019 05:01
https://drive.google.com/open?id=16KNiCCYkNzBK0uryVv9gUKgLAO8kc7Tf

Thank you.
Ulric Boel
13
Years of Service
User Offline
Joined: 7th Nov 2005
Location: Belgium
Posted: 11th Sep 2019 09:17
Hello,

Just remove the "f" to get: fMul = percent / 100.0 and this will work...

The strange thing is I saw the "f" when opening the project for the first time. I edited the source of the scene to remove it and compiled...and now if I put back the "f" and save, it automatically disappears...

Cheers,

Ulric
"I\'m not young enough to know everything!"

Ulric

Login to post a reply

Server time is: 2019-09-22 18:24:08
Your offset time is: 2019-09-22 18:24:08