Jump to content

  • Log In with Google      Sign In   
  • Create Account

Banner advertising on our site currently available from just $5!


1. Learn about the promo. 2. Sign up for GDNet+. 3. Set up your advert!


#Actualnickgastovski

Posted 11 August 2013 - 02:12 AM

I got Eror(]No matching signatures to ... )with this code.

why it's not working?

class IInt{
...
virtual void regFunctions(asIScriptEngine*_engine)=0;
...
};

class Core:public Iint{
...
virtual void regFunctions(asIScriptEngine*_engine){
        Warning("regFunctions");
        int r;

        //
        //!Logging
        //
        r = _engine->RegisterGlobalFunction("void LogPrintf(const string val)", asFUNCTION(ScriptLogPrintf), asCALL_CDECL); assert( r >= 0 );
        r = _engine->RegisterGlobalFunction("void Warning(const string val)", asFUNCTION(ScriptWarning), asCALL_CDECL); assert( r >= 0 );
        r = _engine->RegisterGlobalFunction("void Debug(const string val)", asFUNCTION(ScriptDebug), asCALL_CDECL); assert( r >= 0 );
        r = _engine->RegisterGlobalFunction("void Error(const string val, bool val)", asFUNCTION(ScriptError), asCALL_CDECL); assert( r >= 0 );
       };
};

class Engine:public Core{
...
virtual void regFunctions(asIScriptEngine*_engine){Core::regFunctions(this->mASEngine)}
}
};

#2nickgastovski

Posted 11 August 2013 - 02:12 AM

I got Eror(]No matching signatures to ... )with this code.

why it's not working?

class IInt{
virtual void regFunctions(asIScriptEngine*_engine)=0;
...
};

class Core:public Iint{
virtual void regFunctions(asIScriptEngine*_engine){
        Warning("regFunctions");
        int r;

        //
        //!Logging
        //
        r = _engine->RegisterGlobalFunction("void LogPrintf(const string val)", asFUNCTION(ScriptLogPrintf), asCALL_CDECL); assert( r >= 0 );
        r = _engine->RegisterGlobalFunction("void Warning(const string val)", asFUNCTION(ScriptWarning), asCALL_CDECL); assert( r >= 0 );
        r = _engine->RegisterGlobalFunction("void Debug(const string val)", asFUNCTION(ScriptDebug), asCALL_CDECL); assert( r >= 0 );
        r = _engine->RegisterGlobalFunction("void Error(const string val, bool val)", asFUNCTION(ScriptError), asCALL_CDECL); assert( r >= 0 );
       };
};

class Engine:public Core{

virtual void regFunctions(asIScriptEngine*_engine){Core::regFunctions(this->mASEngine)}
}
};

#1nickgastovski

Posted 11 August 2013 - 01:47 AM

I got Eror(]No matching signatures to ... )with this code.

why it's not working?

class IInt{
virutal void regFunctions(asIScriptEngine*_engine)=0;
...
};

class Core:public Iint{
virtual void regFunctions(asIScriptEngine*_engine){
        Warning("regFunctions");
        int r;

        //
        //!Logging
        //
        r = _engine->RegisterGlobalFunction("void LogPrintf(const string val)", asFUNCTION(ScriptLogPrintf), asCALL_CDECL); assert( r >= 0 );
        r = _engine->RegisterGlobalFunction("void Warning(const string val)", asFUNCTION(ScriptWarning), asCALL_CDECL); assert( r >= 0 );
        r = _engine->RegisterGlobalFunction("void Debug(const string val)", asFUNCTION(ScriptDebug), asCALL_CDECL); assert( r >= 0 );
        r = _engine->RegisterGlobalFunction("void Error(const string val, bool val)", asFUNCTION(ScriptError), asCALL_CDECL); assert( r >= 0 );
       };
};

class Engine:public Core{

virtual void regFunctions(asIScriptEngine*_engine){Core::regFunctions(this->mASEngine)}
}
};

PARTNERS