Advertisement

asIScriptGeneric bool argument?

Started by August 31, 2008 05:54 AM
1 comment, last by jal_ 16 years, 3 months ago
Pair of simple questions about using asIScriptGeneric: Given that there isn't a GetArgBool nor a SetReturnBool, what is recommended to use instead to get a bool argument or set a bool return when using MAX_PORTABILITY? A DWORD? And, what is the difference between making "GetReturnPointer() = xxx" and using SetReturnAddress? Thnx in advance
Yes, you may use DWord for setting/getting the boolean value.


The GetReturnPointer has been badly named. It should be something like GetPointerToReturnValue instead. It will return the pointer to the return value, so you can read/write the value by dereferncing the pointer.

The GetReturnAddress should be used when the return type is an address, e.g. a reference or an object handle. It will give you address returned by function.

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
Thanks, this makes it much clearer.

This topic is closed to new replies.

Advertisement