Assertion failed: container != nullptr

Started by Jervy, 25 October 2015, 12:11:12

Jervy

So I'm having this weird issue where I'm trying to load a container from a file, and tgui throws an assertion failed error at me:


Assertion failed: container != nullptr, file ../WidgetLoader.cpp, line 149

(note that I got the modified version of WidgetLoader we talked about yesterday, so the line might not match yours, but it's the first line of function loadContainer())

Here's the file I'm trying to load:

Container.MM
{
position: (100, 100);
size: (100, 100);
visible: true;
enabled: true;
opacity: 1;
}


I couldn't find anything on the markup of Containers or if they're even allowed in files, hope you can solve this one for me ;)

Thanks for your help in advance.

texus

I had to debug the issue to find out what was going wrong, but the mistake you made is that "Container" is a abstract class and it happens to be a valid widget type since it is used internally to load containers.

What you need is probably the Panel class.

Jervy

Thanks so much, that was exactly what I needed :)