Advertisement

who can give ma an example how to use SetArgAddress?

Started by February 28, 2008 06:15 AM
1 comment, last by yzslhawk 16 years, 9 months ago
Knights: I can not understand the useful of SetArgAddress , who can give me an example? In C++ and In AS
Here's an example:

// 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

Advertisement
thank you very much!

This topic is closed to new replies.

Advertisement