Advertisement

AngelScript modifying wrong address.

Started by June 14, 2008 11:59 AM
1 comment, last by BornToCode 16 years, 8 months ago
r = engine->RegisterObjectProperty("Sprite","bool stopmovement",offsetof(ActorProperty,hitpoints));assert(r>=0); r = engine->RegisterObjectProperty("Sprite","bool waytowalk",offsetof(ActorProperty,waytowalk));assert(r>=0); r = engine->RegisterObjectProperty("Sprite","bool visible",offsetof(ActorProperty,visible));assert(r>=0); The problem that i am having is that when i modify stopmovement, for whatever reason angelscript goes and modify waytowalk. Do u know why would that be the case.
Why is stopmovement using the offset of hitpoints?
Advertisement
Thanx that was an typo mistake. I found what the problem is, stupid me. I was offseting and short variable into an int and that was cause the problem. I figure that the size for both the angelscript and c++ have to match.

This topic is closed to new replies.

Advertisement