All pastes #364039 Raw Edit

Unnamed

public text v1 · immutable
#364039 ·published 2007-02-19 21:44 UTC
rendered paste body
`Network Test

INPUT "Name: ",name$
INPUT "IP: ",IP$
INPUT "Status (H/C): ",status$

status$ = UPPER$(status$)
maxPlayers = 2

IF status$ = "C"
   connected = TJoin(IP$,name$)
ELSE
   connected = THost(IP$,maxPlayers,name$)
ENDIF

IF NOT connected THEN END

TYPE clientT
   name$
ENDTYPE
DIM client(maxPlayers) AS clientT

BACKDROP ON:SYNC ON:SYNC RATE 0

DO

   INC sendDelay,1
   IF sendDelay >= 5
      sendDelay = 0
      TPutString "aaaaa"

      REPEAT
         msg = TGetMessage()
         IF msg
            END
         ENDIF
      UNTIL NOT msg
   ENDIF

   FOR x = 1 TO maxPlayers
      TEXT 0,x*15,"||"+client(x).name$
   NEXT x

   TSYNC
   SYNC

LOOP