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 / Does AGK Tier 1 support booleans?

Author
Message
Hodgey
14
Years of Service
User Offline
Joined: 10th Oct 2009
Location: Australia
Posted: 19th Aug 2011 10:44
Hi guys, I decided to re-write one of my games in AppGameKit (from DBPro) and I make use of a lot of booleans. When I tried to declare a boolean like this:


It compiles but I get an error when I run the program, something like exe doesn't exist. If you then compile something that works ie hello world program, change the code to the code shown above, compile, run, it will run the hello world program. So basically compiles but no exe created or no compile error.

So is there a way to declare a boolean? My apologies if I have missed a very obvious answer.

Here is the DBPro equivalent:


Mobiius
Valued Member
21
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 19th Aug 2011 16:38
Just use Ints?

My signature is NOT a moderator plaything! Stop changing it!
Hubdule
21
Years of Service
User Offline
Joined: 3rd Sep 2002
Location: Gundelsheim
Posted: 19th Aug 2011 16:54
What about that:





Life is good!
DVader
20
Years of Service
User Offline
Joined: 28th Jan 2004
Location:
Posted: 19th Aug 2011 18:07
I have never used them in DB. I can't see why you would need to specify it. I just set whatever flag I am using to 1 for on and 0 for off, or true and false if you prefer. I also don't really see the point of constants, if you never change a variable it will remain constant anyway, so why bother?
Everyone has their own style of programming I suppose. I'm sure you will find your preferred method with AGK.

http://s6.bitefight.org/c.php?uid=103081
KISTech
16
Years of Service
User Offline
Joined: 8th Feb 2008
Location: Aloha, Oregon
Posted: 19th Aug 2011 20:14
AGK supports,

- Strings
- Floats
- Integers

Hodgey
14
Years of Service
User Offline
Joined: 10th Oct 2009
Location: Australia
Posted: 20th Aug 2011 00:44
Thanks for the confirmation guys and for some reason I'm getting compiler errors now which is what I was after...in a way.

@ Hubdule: that is a very clever work around!

Login to post a reply

Server time is: 2024-04-18 17:02:22
Your offset time is: 2024-04-18 17:02:22