When I try to call this function I get NullreferenceException, if the code looks weird thats because I'm translating from c++ to c#.
public class MyPlayer_t
{
int pLocal;
public int Team;
public int Health;
public float[] Position = new float[3];
public void ReadInformation()
{
pLocal = Mem.ReadInt(Client + playerBase);
Team = Mem.ReadInt(pLocal + teamOffset);
Health = Mem.ReadInt(pLocal + healthOffset);
for (int i = 0; i < 3; i++)
{
Position[i] = Mem.ReadFloat(pLocal + Pos);
}
}
}
MyPlayer_t MyPlayer;
// This is how I call it
MyPlayer.ReadInformation();