who can give ma an example how to use SetArgAddress?
Knights:
I can not understand the useful of SetArgAddress , who can give me an example? In C++ and In AS
Here's an example:
Regards,
Andreas
// Scriptvoid Test(float &out outValue){ outValue = 3.141592f;}
// C++int funcId = engine->GetFunctionIdByDecl(0, "void Test(float &out)");asIScriptContext *ctx = engine->CreateContext();ctx->Prepare(funcId);float value;ctx->SetArgAddress(0, &value);ctx->Execute();assert( value == 3.141592f );ctx->Release();
Regards,
Andreas
AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement