🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

asIScriptGeneric bool argument?

Started by
1 comment, last by jal_ 15 years, 10 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
Advertisement
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

Thanks, this makes it much clearer.

This topic is closed to new replies.

Advertisement