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 Classic Chat / Weird bug in AGK v1?

Author
Message
easter bunny
11
Years of Service
User Offline
Joined: 20th Nov 2012
Playing: Dota 2
Posted: 25th Oct 2014 02:02 Edited at: 25th Oct 2014 02:03
Just found the strangest bug.... It looks like you can't name a variable 'run'.......
Anyone know why?



EDIT: Never mind, found out why, I had the code #constant run 2, HOWEVER it was commented out. AppGameKit just parsed it anyway.
Something to look out for I guess, AppGameKit still parses #constants when they are commented out.

EDIT2: Can someone check if this happens in AGKv2?

Just run the following code:




Audacia Games - Latest WIP - AUTOMAYTE 2.1, AppGameKit one click deploy to Android
"When you've finished 90% of your game, you only have 90% left"
Multicoder
AGK Developer
9
Years of Service
User Offline
Joined: 25th Oct 2014
Location: Germany
Posted: 26th Oct 2014 00:30
Compiles without errors and foobar has a value of 123 in AGKv2 Alpha 8
When I delete "foobar=123", the compiler throws an error: Variable "foobar" is used without being defined or initialised.

Yes, I am aware that I sound like a caveman to native english speakers
JimHawkins
14
Years of Service
User Offline
Joined: 26th Jul 2009
Location: Hull - UK
Posted: 26th Oct 2014 08:32
V2 requires variables to be declared before they are used. This avoids all sorts of type-mismatch bugs.

-- Jim - When is there going to be a release?

Login to post a reply

Server time is: 2024-04-25 05:39:47
Your offset time is: 2024-04-25 05:39:47