APEXnow Posted 14 hours ago Posted 14 hours ago Hi all, Apologies if this is a fairly straigtforward question, but can someone explain to me how the ParseCommandLine function works? I can see the -devmode parameter and I also wanted to add other parameters, including the -map parameter, but when I try to provide a value for the -map parameter, I can't seem to yield it using the standard commandLine[] method. Basically, I need to know the correct format of the command line that has the key "-map" and the name of the map to use. Is it "-map:mapname" or "-map mapname" or "-map=mapname" etc.? Thank you. Paul. [EDIT] I know this can be done simply by interpreting the string myself, but why rewrite code that has already been done for me? Quote
Solution Josh Posted 8 hours ago Solution Posted 8 hours ago Let's consider this command line: +map "Maps/level1.map" -fullscreen If you have a word that starts with +, it takes the next parameter as the value: +map "Maps/level1.map" Values can be strings, numbers, or booleans. If you have a word that starts with - it just sets the value to true: -fullscreen So in the returned table, the value "map" would be "Maps/level1.map" and the value "fullscreen" would be true. 1 Quote Let's build cool stuff and have fun.
APEXnow Posted 1 hour ago Author Posted 1 hour ago Thank you so much Josh, it all makes sense now. Much appreciated for the quick response. Paul. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.