Skip to main content
GameDev.net gamedev.net
🔒 Locked

asIScriptGeneric bool argument?

Started by jal_ Aug 31, 2008 at 5:54 AM 1 replies 1.1k views
Original Post
jal_
jal_
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
WitchLord
WitchLord
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 - <a href="http://www.angelcode.com/tower" rel
jal_
jal_
Thanks, this makes it much clearer.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.