06-05-2024, 03:02 PM
(This post was last modified: 06-05-2024, 03:13 PM by Kernelpanic.)
It runs with a small extension: a query as to whether the server should be started.
It bothered me that the server started immediately.
Two warnings. I don't understand "Yes" now. - Update: It's clear to me now.
It bothered me that the server started immediately.
Code: (Select All)
'Steves Chat Programm - 5. Mai 2024
Option _Explicit
$Color:32
Const Port = "7319", IP = "172.93.60.23"
Const FullPort = "TCP/IP:" + Port
Const FullIP = FullPort + ":" + IP
Dim Shared As Long client 'up to 1000 connections
Dim As String recieved
Dim Shared As String nam
Dim Shared As Long MainDisplay, TextArea, InputArea
Dim Shared As _Float NextPing, server_active
Dim Shared As _Byte TimeStamp 'toggle type display variables
Dim Shared As _Unsigned Long DefaultColor, AudibleAlert
MainDisplay = _NewImage(1280, 720, 32)
TextArea = _NewImage(1280, 600, 32)
InputArea = _NewImage(1280, 120, 32)
DefaultColor = White
TimeStamp = -1
AudibleAlert = -1
Screen MainDisplay
'A query as to whether the server should be started.
Dim As String antwort, yes
Locate 3, 3
Input "Server starten: Yes -- No: ", antwort
If antwort = "yes" Then
client = _OpenClient(FullIP)
Else
Locate 5, 3
Print "Tschuessi!": Sleep 2
System
End If
Two warnings. I don't understand "Yes" now. - Update: It's clear to me now.