Angelscript - RegisterScriptArray fails

273 Views Asked by At

i am trying to get an angelscript test running, however, calling RegisterScriptArray() fails

System function (1, 39) : ERR  : Expected '<end of file>'
 (0, 0) : ERR  : Failed in call to function 'RegisterObjectBehaviour' with 'array' and 'array<T>@ f(int&in type, int&in list) {repeat T}' (Code: -10)

the code is:

engine = asCreateScriptEngine(ANGELSCRIPT_VERSION);

// message callback
int r = engine->SetMessageCallback(asFUNCTION(as_messageCallback), 0, asCALL_CDECL); assert( r >= 0 );

RegisterStdString(engine);
RegisterScriptArray(engine, false);

r = engine->RegisterGlobalFunction("void print(const string &in)", asFUNCTION(as_print), asCALL_CDECL); assert( r >= 0 );

What should i do? If i comment out the call it works, but thats obviously not what i want to archieve as i want arrays

1

There are 1 best solutions below

1
Kilobyte On BEST ANSWER

After asking on their forums I got a reply (actually quite some time ago).

http://www.gamedev.net/topic/657233-registerscriptarray-fails

In case the link dies:

The main issue was a version mismatch between the plugins (which I compiled and installed manually) and the core (which I installed through my package manager). Now I include the plugins in my code and the core is manually compiled.

Hope it helps others encountering the same issue.