I have been following this tutorial on youtube
I’ve been able to setup a server (pretty much) thanks to the first episode and I’ve tried to follow the episode that I’ve linked and Visual studio has given me two of these errors:
Error CS0246 The type or namespace name ‘packet’ could not be found (are you missing a using directive or an assembly reference?) EnforcerMultiplayerServer
Error CS0103 The name ‘ServerPackets’ does not exist in the current context EnforcerMultiplayerServer
Does anyone have any idea on how to fix these errors? I am going to post this in the programming section as well. Here’s the scripts I used:
using System;
using System.Collections.Generic;
using System.Text;
namespace EnforcerMultiplayerServer
{
class ServerSend
{
public Packet packet;
public static void SendTCPData(int _toClient, Packet _packet)
{
}
public static void Welcome(int _toClient, string _msg)
{
using(packet _packet = new packet((int)ServerPackets.welcome))
{
_packet.Write(_msg);
_packet.Write(_toClient);
sendTCPData(_toClient, _packet);
}
}
}
}
The packets script: tcp-udp-networking/GameServer/GameServer/Packet.cs at tutorial-part2 · tom-weiland/tcp-udp-networking · GitHub