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.

DarkBASIC Professional Discussion / how does DB receive a CMD parameter

Author
Message
mmuziek
16
Years of Service
User Offline
Joined: 31st Jul 2009
Location: holland
Posted: 10th Sep 2010 14:32
hello
i try to activate a function. but i want that if i run a
bat file

Start mygame.exe gp
that the mygame activates a function when gp parameter is called at start

anyone can help me?

bergice
19
Years of Service
User Offline
Joined: 5th Jun 2007
Location: Oslo,Norway
Posted: 10th Sep 2010 14:56
You mean:



?

9cdfb439c7876e703e307864c9167a15
mmuziek
16
Years of Service
User Offline
Joined: 31st Jul 2009
Location: holland
Posted: 10th Sep 2010 15:35
i have no idea what that code do

ShaunRW
DBPro Developer
18
Years of Service
User Offline
Joined: 7th Jan 2008
Location: Brisbane, Australia
Posted: 10th Sep 2010 15:42 Edited at: 10th Sep 2010 15:44
CL$() is the function that returns the command line given when started. so if you had a bat file like this > Start mygame.exe gp
then CL$() would return the string "gp".

mmuziek
16
Years of Service
User Offline
Joined: 31st Jul 2009
Location: holland
Posted: 10th Sep 2010 17:43
so this code must work?


Indicium
18
Years of Service
User Offline
Joined: 26th May 2008
Location:
Posted: 10th Sep 2010 20:22
Nope.



Grog Grueslayer
Valued Member
21
Years of Service
User Offline
Joined: 30th May 2005
Playing: Green Hell
Posted: 11th Sep 2010 12:07
Quote: "so this code must work?"


You really need to check out TDKs Tutorials to get a basic understanding of Darkbasic:

http://forum.thegamecreators.com/?m=forum_view&t=99497&b=10

If you don't look at them your going to continue to struggle doing the most basic of things.

Login to post a reply

Server time is: 2026-07-22 11:01:49
Your offset time is: 2026-07-22 11:01:49