Game Development Community

TwSurfaceReference, externs and structs

by Stefan Beffy Moises · in Torque Game Engine · 05/17/2004 (3:17 pm) · 3 replies

Hi there, I am trying to make Ken C. Finney's cool twSurfaceReference object a serverside "marker" type objects and hit a wall with externs and structs...
beffy.de/phpwiki-1.3.7/index.php/ScratchBook
I have this
extern struct TerrainSurfaceStruct BaseTerrainSurfaces[];
and I want it to be a member variable of SurfaceMarker...
I've posted the code on that wiki page, basically I was just trying to get the definition of that struct into the "public" section of the header, but it gives me syntax errors if I do so...
(Syntax error: '{' ...)
public:
struct TerrainSurfaceStruct BaseTerrainSurfaces[] = {   { false, NULL},{ false, NULL},{ false, NULL},{ false, NULL},
{ false, NULL},{ false, NULL},{ false, NULL},{ false, NULL},
{ false, NULL},{ false, NULL},{ false, NULL},{ false, NULL},
{ false, NULL},{ false, NULL},{ false, NULL},{ false, NULL} } ;

any ideas how I get this extern struct to a member var, pointer, whatever? :/

#1
05/17/2004 (4:29 pm)
...
#2
05/17/2004 (10:35 pm)
Joseph: yeah, that was exactly the problem, it was really late yesterday and I wanted to get this done before sleep... and now I'm tired like hell, should've slept instead and fix it today ;)
But thanks! :)
#3
05/17/2004 (10:47 pm)
...