Hi I have a weird error.
Here's my code with a bunch of unimportant stuff cut out:
#pragma once
struct PFNode
{
int gCost;
int hCost;
int fCost;
int x, z;
int id;
PFNode* parent;
bool blocked;
bool checked;
};
extern PFNode map[LARGEST_MAP_SIZE][LARGEST_MAP_SIZE];
static void InitPathFinder(World* world)
{
worldW = world->getTilesWide();
worldL = world->getTilesLong();
for (int z = 0; z < worldL; ++z)
for (int x = 0; x < worldW; ++x)
{
map[x][z].x = x;
map[x][z].z = z;
map[x][z].id = x + z * worldW;
map[x][z].blocked = world->getTile(x, z)->isBlocked;
map[x][z].checked = false;
}
}
So I get errors saying "1>EM_Component_Mover.obj : error LNK2001: unresolved external symbol "struct PFNode (* map)[256]" (?map@@3PAY0BAA@UPFNode@@A)