🎉 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!

CScriptAny not handling primitive types correctly

Started by
2 comments, last by WitchLord 9 years, 6 months ago

CScriptAny is not handling primitive types correctly.

When i give it a uint32, it stores the value correctly, but when i later try to retrieve it, the retrieve method that takes a asTYPEID_INT64 is called, preventing it from getting the value. I recall reading something somewhere about this being fixed, but i don't remember where.

Does the latest version on SVN fix this?

Advertisement

How did you store the uint32? Did you call "Store(void *ref, int refTypeId)" manually?

The intention is that all integer primitives are stored as asINT64, and all float primitives as double. This is why the object has the two Store(asINT64) and Store(double).

AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game

I called Store(void* ref, int refTypeId). I'll call the appropriate variant instead.

I'll add a check in Store(void *ref, int refTypeId) to verify that it isn't called with the wrong type. Thanks.

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