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
4
Years of Service
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
21
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
4
Years of Service
User Offline
Joined: 4th Aug 2019
Location:
Posted: 11th Sep 2019 05:01
https://drive.google.com/open?id=16KNiCCYkNzBK0uryVv9gUKgLAO8kc7Tf

Thank you.
Ulric Boel
18
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
Jon of Compaid
4
Years of Service
User Offline
Joined: 12th Nov 2019
Location:
Posted: 12th Nov 2019 14:35 Edited at: 12th Nov 2019 14:54
Hello - I'm having the same problem. Except when I remove the f, it just reappears every time.

I take off the write-protection, delete the f, save, and then next time I look it's back! Even just switching to the 2D tab and back to the Script tab brings it back. Compile and it comes back... etc.

I'm really stuck!

EDIT: I've half-solved it from a post on a Steam board. If I change it, save it and then close the window, it works. The moment I open the window again, the rogue f is repopulated..!
Jon of Compaid
4
Years of Service
User Offline
Joined: 12th Nov 2019
Location:
Posted: 12th Nov 2019 14:57
I've got the same problem, except the f just keeps on reappearing.

The only way I can get it to work is by removing it, saving it and then immediately closing the Scene window. It works, but if I reopen the Scene... the f reappears with it!
tiresius
21
Years of Service
User Offline
Joined: 13th Nov 2002
Location: MA USA
Posted: 12th Nov 2019 16:15
This is a known bug with the free Demo. I'm not sure when it will be fixed but apparently the latest build of paid app it is working.
PartTimeCoder
AGK Tool Maker
9
Years of Service
User Offline
Joined: 9th Mar 2015
Location: London UK
Posted: 12th Nov 2019 18:33
I also encountered this error:

https://forum.thegamecreators.com/thread/225353

I completely solve the issue by purchasing Studio.

Login to post a reply

Server time is: 2024-04-25 16:07:01
Your offset time is: 2024-04-25 16:07:01