| Blockland Forums > Modification Help |
| Connext Argument on the Executable? |
| (1/3) > >> |
| 1529op:
If there an argument that you can run on the EXE of Blockland to connect to a server automatically? Like -connect 55.55.555.555? Im trying to make custom support for Xfire so Blockland can connect to servers. |
| TheCannon187:
If there is a code, it would be an engine command, so if you were able to find <master server address, server IP, port> and say for example "<master server address, server IP, port>". I can't give you a straight answer, but try looking around for some Torque Engine tutorials. |
| Space Guy:
main.cs --- Code: ---function parseArgs() { for ($i = 1; $i < $Game::argc ; $i++) { $arg = $Game::argv[$i]; $nextArg = $Game::argv[$i+1]; $hasNextArg = $Game::argc - $i > 1; $logModeSpecified = false; //echo("ARG = ", $arg); //echo("-hasnextarg = ", %hasNextArg); switch$ ($arg) { ... case "-connect": $argUsed[$i]++; if ($hasNextArg) { // mark which server we will automatically connect to setAutoConnect($nextArg); $argUsed[$i+1]++; $i++; } else error("Error: Missing Command Line argument. Usage: -connect <x.x.x.x:port>"); ... case "-connect": $argUsed[$i]++; if ($hasNextArg) { $JoinGameAddress = $nextArg; $argUsed[$i+1]++; $i++; } else error("Error: Missing Command Line argument. Usage: -connect <ip_address>"); ... case "-serverName": $argUsed[$i]++; if ($hasNextArg) { $serverNameArg = $nextArg; $serverNameArg = strReplace($serverNameArg, "_", " "); $argUsed[$i+1]++; $i++; } else error("Error: Missing Command Line argument. Usage: -serverName <name>"); ... } if(!$NoConsole) EnableWinConsole(true); //automatically record journal for debug if(!%playingJournal) if(getBuildString() $= "Debug") saveJournal("auto.jrn"); } --- End code --- I don't know why there's two -connect ones but it's likely the first one is more relevant, because it would be found first by switch$. |
| 1529op:
How did you get that code? From vanilla or what? And also, one says that if you do it wrong, put in the right IP, and the other says put the IP and port. |
| 1529op:
Damn U missing edit button. What I was gonna say was that I also don't see any code to actually preform the server connection. Only setting variables, unless it's in other code. |
| Navigation |
| Message Index |
| Next page |