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 / Use console and graphics (tier 2)

Author
Message
Thestroyer
8
Years of Service
User Offline
Joined: 14th May 2016
Location:
Posted: 29th Jan 2017 11:06 Edited at: 29th Jan 2017 11:14
I want to use the console for debug purposes and I also want to use the agk commands for the graphics in another window. Is there any easy way to do it in tier 2? No cross-platform compatibility is needed: it only needs to work on windows.
Lucas Tiridath
AGK Developer
16
Years of Service
User Offline
Joined: 28th Sep 2008
Location: Kings Langley, UK
Posted: 29th Jan 2017 14:00
If you only need to print strings to the Visual Studio console, you can use the OutputDebugString function. Unfortunately, this doesn't support any printf like syntax so to use it to show variables etc., you need to create your string with sprintf or whatever first. If you need a true DOS console running in a separate window that you can output to though, then it's a bit more involved as you have to open one yourself.
Thestroyer
8
Years of Service
User Offline
Joined: 14th May 2016
Location:
Posted: 29th Jan 2017 18:49
Thanks for your answer. With your help and some help of google this is the solution I ended up with:

Login to post a reply

Server time is: 2024-11-24 20:32:40
Your offset time is: 2024-11-24 20:32:40