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 Discussion / Case problem

Author
Message
Lover of games
20
Years of Service
User Offline
Joined: 17th Apr 2005
Location:
Posted: 18th Jun 2006 13:47


As you can see, I'm trying to make a small program that writes a file, writes text to file. I put a select case in this program. i go to run it and it says:

if prog$= "Notepad" EXECUTE FILE "C:\WINDOWS\NOTEPAD.EXE" ,commandline$,directory$,1

Unrecognised paramater. anyway to fix this so i can add multiple select cases? thanks in advance for the help

"Originally I was going to have a BS on it but you know how that would be. I can't walk around with the letters BS on me." More or less a qoute by Syndrome from Jack, Jack, attack
Sven B
20
Years of Service
User Offline
Joined: 5th Jan 2005
Location: Belgium
Posted: 18th Jun 2006 13:51 Edited at: 18th Jun 2006 13:54
if prog$= "Notepad" then EXECUTE FILE "C:WINDOWSNOTEPAD.EXE" ,commandline$,directory$,1

case default : "you've entered something wrong!" : endcase

And its


So in your program, it should be something like


It's the programmer's life:
Have a problem, solve the problem, and have a new problem to solve.
Lover of games
20
Years of Service
User Offline
Joined: 17th Apr 2005
Location:
Posted: 18th Jun 2006 14:02
Thanks, i actually figured it out. (I'm sorry if i post a problem and then figure it out.) Maybe next time i should take a better look at my code. Sorry about the post

"Originally I was going to have a BS on it but you know how that would be. I can't walk around with the letters BS on me." More or less a qoute by Syndrome from Jack, Jack, attack

Login to post a reply

Server time is: 2025-05-25 02:07:05
Your offset time is: 2025-05-25 02:07:05