Something that I have noticed that you are still doing that was pointed out previously is having a pointer to a class reference.

Stuff like ``Tile* currentTile;`` when it should be ``Tile currentTile;``

A class reference is inherently a pointer.

So when you checked for nullability in the foreach loop of mission:

```d
if (startTile.occupant !is null && (*startTile.occupant) !is null) {
```

is what it should've looked like.

```d
import std.stdio : writeln;

void main() {
    Object o = new Object;
    writeln(cast(void*)o); // 7F2780EFD000
}
```
  • Why am I getting... Liam McGillivray via Digitalmars-d-learn
    • Re: Why am ... Richard (Rikki) Andrew Cattermole via Digitalmars-d-learn
      • Re: Why... Liam McGillivray via Digitalmars-d-learn
        • Re:... Richard (Rikki) Andrew Cattermole via Digitalmars-d-learn
        • Re:... Liam McGillivray via Digitalmars-d-learn

Reply via email to