Is this a bug or expected behaviour.
TarotRedhand
Member Posts: 1,481
I am currently doing some research and stumbled across something. I created a pair of structs -
TR
struct uFirst { int a; float b; string c; }; struct uSecond { struct uFirst d; int e; };And tested to make sure there were no syntax or other errors. The toolset compiler had no trouble with that. However whenever I try to use struct d in uSecond even to just assign another instance of struct uFirst to it I get an access violation error. Is this a bug? In C/C#/C++ what I am trying to do is perfectly valid and also it must be processed when you use an NwN variable of type location too. Ideas?
TR
1
Comments
Seeing as the built-in data types that are structs (location etc.) have no problem handling this isn't it time that user scripts had the same ability? Being able to handle just a single level of nesting would unlock the true potential of this data type.
TR
that's pretty much a known issue with the compiler. It can't do nested structs. We'd have to fix it for this to be viable. So yeah, it's a bug, but it's been that way since the NWN release.
vector vVec = Vector(x, y, z);
It would be nice to be able to do the same thing for constructors for user created structs as well.
TR