Blockland Forums > Modification Help
Connext Argument on the Executable?
<< < (2/3) > >>
Space Guy:
main.cs comes with every Torque game, next to the executable. I assume that setAutoConnect is a function linked to the engine, rather than the scripting, attempts to connect to that server as if you'd put it in the Manual Join function as soon as the engine is loaded. I'd use the x.x.x.x:port one, since all Blockland joining (the "sending connect request..." screen) has the port too.
1529op:
When I try to connect to a server that is online, I get this in my Log and BL starts normally and doesn't connect:

--- Code: ---Input Init:
   keyboard0 input device created.
   mouse0 input device created.
   DirectInput enabled.

--------- Parsing Arguments ---------
<input> (0): Unable to find function setAutoConnect
--------- Loading Common ---------
Loading compiled script base/main.cs.
Loading compiled script base/client/defaults.cs.
Loading compiled script base/server/defaults.cs.
Executing base/config/client/prefs.cs.
Executing base/config/server/prefs.cs.
--------- Loading MODS ---------
Skipping mod: Add-Ons
--- End code ---
Space Guy:
Okay, try deleting the first connect one (setAutoConnect) and use just the one with IP instead, $JoinGameAddress. Badspot probably used the standard file but deleted setAutoConnect for some reason.
1529op:
Now it doesn't parse anything, or at least say anything in the console... I wish Badspot just locked the Authentication code and made everything else open source...
Space Guy:
Make the auth checks part of the exe, then really stop you hosting (like AoT deleted all start server bits, BL could Auth Check --> Abort) if it's not validated.

Ok, try this:

--- Code: ---              case "-connect":
                 $argUsed[$i]++;
                 if ($hasNextArg)
                 {
                    // Try to connect to the server.
                    connect($nextArg);
                    $argUsed[$i+1]++;
                    $i++;
                 }
                 else
                    error("Error: Missing Command Line argument. Usage: -connect <x.x.x.x:port>");
--- End code ---

replacing the top -connect one.
Navigation
Message Index
Next page
Previous page

Go to full version