Could somebody please tell me, how to deal with the GetDependenciesForProject() function and it's results in CB scripts?
I tried:
local asProjects = GetProjectManager().GetDependenciesForProject(oPrj);
foreach(prj in asProjects)
{
...do something with prj...
}
As result I got an errormessage and some debug informations in Script console:
AN ERROR HAS OCCURED [cannot iterate userdata]
CALLSTACK
*FUNCTION [GenerateDocumentsWithDependants()] C:\...blah.script line [378]
*FUNCTION [OnMenuClicked()] C:\...blah.script line [116]
LOCALS
[@ITERATOR@] NULL
[prj] NULL
[@INDEX@] NULL
[asProjects] USERPOINTER
[oPrj] INSTANCE
[this] INSTANCE
[index] 1
[this] INSTANCE
Your wiki says, the function is exported like:
ProjectsArray* GetDependenciesForProject(cbProject* base)
So, isn't that a standard squirrel array type?
Regarding Bug #13608:
It's still the same, tried it today.
I found another issue regarding global constants. When I tried do execute:
if( PLATFORM == PLATFORM_MSW )
do_something();
I've got a squirrel error. It worked fine when I prefixed "::" to the constant:
if( ::PLATFORM == ::PLATFORM_MSW )
do_something();
It's not a bug, but not mentioned in documentation. This problem occurs while using constants inside a function.