StartNetGame.htm 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. <html>
  2. <head>
  3. <title>Blitz3D Docs</title>
  4. <link rel=stylesheet href=../css/commands.css type=text/css>
  5. </head>
  6. <body>
  7. <h1>StartNetGame()</h1>
  8. <h1>Parameters</h1>
  9. <table>
  10. <tr>
  11. <td>
  12. None.
  13. </td>
  14. </tr>
  15. </table>
  16. <h1>Description</h1>
  17. <table>
  18. <tr>
  19. <td>
  20. Displays a Windows dialog with option to join or start a new multiplayer network game, via modem, serial connection or TCP/IP (Internet). <br />
  21. <br />
  22. Note: This command must be started before any other network commands, otherwise they will fail. <br />
  23. <br />
  24. A return value of 0 indicates failure, 1 means a game was joined and 2 means a game was created and is being hosted on the local machine.
  25. </td>
  26. </tr>
  27. </table>
  28. <h1><a href=../2d_examples/StartNetGame.bb>Example</a></h1>
  29. <table>
  30. <tr>
  31. <td>
  32. newGame = StartNetGame() <br />
  33. ; Check the status of the new game. <br />
  34. If newGame = 0 Then <br />
  35. print "Could not start or join net game." <br />
  36. ElseIf newGame = 1 <br />
  37. print "Successfully joined the network game." <br />
  38. ElseIf newGame = 2 <br />
  39. print "A new network game was started." <br />
  40. EndIf <br />
  41. </td>
  42. </tr>
  43. </table>
  44. <br>
  45. <a target=_top href=../index.htm>Index</a><br>
  46. <br>
  47. Click <a href=http://www.blitzbasic.co.nz/b3ddocs/command.php?name=StartNetGame&ref=comments target=_blank>here</a> to view the latest version of this page online</body>
  48. </html>