Assertion failure when doing funky stuff with `ref`s

Started by
3 comments, last by xertrov 1 year, 3 months ago

I ran into some assertion failures to do with refs while working on an OpenPlanet plugin. (original issue: https://github.com/openplanet-nl/issues/issues/241)

I was trying a hacky way to pass arbitrary data via ref to a coroutine: cast<ref>({cast<ref>(layer), cast<ref>({pageName})}).

This produced the following assertion failures:

image
first one, clicked ‘ignore’
image
Second one

I got a compile error after that, and could continue on as normal.
The compile error was No conversion from '<unrecognized token>' to ‘ref’ available. (See the github issue linked above for a little more details/context.)

My next iteration was this, and worked:

ref@[] ud;
ud.InsertLast(layer);
ud.InsertLast(array<string> = {pageName});
CtrlButton("Copy ML", OnClickCopyML, ud);
Advertisement

Thanks for reporting this.

Looks like the problem is when trying to cast the anonymous array to the ref. The compiler should be giving an error, not an assert failure.

I'll have this fixed as soon as I can.

Regards,
Andreas

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've fixed this problem in revision 2820.

https://sourceforge.net/p/angelscript/code/2820/

Regards,
Andreas

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, much appreciated!

This topic is closed to new replies.

Advertisement