What it does
NetConnect takes no arguments, and answers an integer. That is the first of 3 forms.
Syntax
1
NetConnect() → integer2
NetConnect(projectId string) → integer3
NetConnect(projectId string, url string, playerName string, team string) → integerParameters
| Name | Type | In forms |
|---|---|---|
| projectId | string | 2, 3 |
| url | string | 3 |
| playerName | string | 3 |
| team | string | 3 |
Every form returns
integer
Example · generated
Form 1, the short one
DO Print(NetConnect()) Sync()LOOPForm 3, with every argument
DO Print(NetConnect("value", "https://example.com", "player", "value")) Sync()LOOPNetConnect is called and its answer is printed every frame. The DO … LOOP is not decoration: a classic BASIC program ends the moment it runs out of lines, and Sync() is what draws the frame.