ID:1019937
 
(See the best response by A.T.H.K.)
Code:
startup(Path + DMBName, Port, "safe")
/* I tried to use this to host a child instance of dreamdaemon to hold a game specified by the manager.
*/

shell("DreamDaemon [Path][DMBName] [Port] -safe")
/*
Also tried with shell, but was returning an error if the options was not correct (Windows).
Or wouldn't open a child copy of DD at all if every options were valid.
*/


Problem description:
I can't seem to make this work, it is the startup()/shell() proc that is giving me the error, the rest works just fine.


What is "the error"?
when using shell("DreamDaemon Suppa Chat/Suppa Chat.dmb 2233 safe")

I get an 'invalid option 'Chat.dmb'' error.
And with startup()?
It won't return the error again, but said something about
'Theres no information on '2233'' or something of that matter.
Best response
Sorry this was in reply to post #2

shell("DreamDaemon Suppa Chat/Suppa Chat.dmb 2233 safe")

That safe tag should be

-safe

Throw in a

-logself

As well this will create a text file with the same name as the .dmb and report errors.
All needs to be said, as this is being tried on MS_WINDOWS system_type.
Your path you have to handle spaces differently in Windows.

I believe I have come across this when messing with batch stuff.

Although it's wrapped in " ...
As after a few testing, I figured it could be a slash issue, when I was using / instead of \ when it is runt on windows.

I will have to make it to automatically use one or another depending on the system hosting the instance.
I have it currently working, only problem is that folders with spaces or files with spaces throws error.

What character does replace an space on Linux and Windows commands?
Windows: "My Folder With Spaces\My File.dmb"

Linux: My\ Folder\ With\ Spaces/My\ File.dmb

You should be able to test things on both Windows and Linux with command expansion.

Example:

On Windows, run cmd.exe and get into a directory that has a folder with spaces. Type the first word of the folder with spaces, and hit tab. You'll see that it expands into both words, and surrounds with ".

On Linux, open your terminal and do the same as above. You will see that it expands spaces by escaping them with \.