array of strings
AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game
string[] Vars;
void initvars()
{
Vars[0]="aaaa";
Vars[1]="bbbb";
}
and get this:
saveload.script (3, 1) : Info : Compiling void initvars()
saveload.script (5, 10) : Error : Can't implicitly convert from 'string@&' to 'uint8&'.
saveload.script (6, 10) : Error : Can't implicitly convert from 'string@&' to 'uint8&'.
Build failed
Array of strings initialized with initialization lists are part of the regression tests: tests/test_feature/source/test_array.cpp. So this should be still be working.
AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game
RegisterScriptString(m_Engine);
RegisterScriptStringUtils(m_Engine);
also try
RegisterStdString(m_Engine);
and get some error.
Could you give the test_feature a try, to see if that works? If it works then it must be something specific condition of your application that causes this problem in AngelScript.
Hmm, are you perhaps using the CScriptBuilder add-on? If so, the bug may be in that code, as it could be mistaking the [] for metadata strings.
AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game
However, if you do not use metadata I suggest you keep it turned off to avoid the extra overhead it causes during script building.
AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game
I plan on improving the CScriptBuilder for future releases, to make it more flexible while processing the #include directives. One thing that I have planned for it is to implement callbacks, so that the application can supply the included files in the way that is most appropriate to the application. It should also have an improved file path resolution, for when the application doesn't handle this itself.
AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game