I have an issue where if I use nested namespace I can't access them with-in a method.
r = e->SetDefaultNamespace("dev::log");
r = e->RegisterGlobalFunction("void info(const ::string &in)", asFUNCTION(util::log_info), asCALL_CDECL); assert(r >= 0);
r = e->RegisterGlobalFunction("void warning(const ::string &in)", asFUNCTION(util::log_warning), asCALL_CDECL); assert(r >= 0);
r = e->RegisterGlobalFunction("void error(const ::string &in)", asFUNCTION(util::log_error), asCALL_CDECL); assert(r >= 0);
If I run this function this works.
void main()
{
dev::log::info("doop");
dev::log::warning("doop");
dev::log::error("doop");
}
But if I instance and run huh().
class Test
{
void huh()
{
dev::log::info("Hi");
}
}
I get the error
ERR : Namespace 'dev' doesn't exist.
Error doesn't happen with one level of namespaces, ie. just 'log'
Have I done something incorrect?