How to call items from another file?

Posted By: MattyTheG

How to call items from another file? - 11/14/08 02:02

Alright so I was having trouble displaying text on the screen and realized that using PANEL* and digits() had to be a .c file, so I put that into a .c file and used #include <panel.c> at the top of my main.wdl script.

The problem is that everything builds fine, but my panel still doesn't show up. Do I have to call this panel some how in my other script file? I am currently learning C++ for school but it doesn't seem to help much here haha.

Thanks for any help.
Posted By: Michael_Schwarz

Re: How to call items from another file? - 11/14/08 02:05

yourpanelname.flags |= VISIBLE;
Posted By: MattyTheG

Re: How to call items from another file? - 11/14/08 02:13

This is my panel script:

PANEL* scorePan =
{
digits(300,10,"Score %f",Arial#15,1,score);
flags = VISIBLE;
}

When I did scorePan.flags |= VISIBLE; instead of flags = visible; I get an error saying scorePan is not a valid keyword.

I tried scorePan.flags |= VISIBLE; in my main function but i also got the same error.
Posted By: Uhrwerk

Re: How to call items from another file? - 11/14/08 03:03

Try #include "panel.c" instead of #include <panel.c>.
Posted By: MattyTheG

Re: How to call items from another file? - 11/14/08 03:14

Alright I changed it to quotations and no more build errors yet the panel still does not show.

Is using the #include enough or do I need to like define/call it in my main.wdl?

PS: Thanks for that attempts at helping so far smile
© 2024 lite-C Forums