Advertisement

CScriptAny not handling primitive types correctly

Started by December 07, 2014 02:55 PM
2 comments, last by WitchLord 9 years, 11 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?

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

Advertisement

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