Page 2 of 3

Re: if failure?

Posted: September 21st, 2010, 6:18 pm
by Drofder2004
Create a seperate thread that simply loops...

If the HUD units are not defined then print a message.

hopefully we should be able to find otu whether or not the HUd is being created or just ignored.

Re: if failure?

Posted: September 21st, 2010, 7:15 pm
by Moustache
Thank you for the fast reply :)

On the first try, without reconnect I see this in console:
Warn ^7is ^2working
Warn^62 ^7is ^2working
And the hud looks perfect

After a reconnect I still see this in console:
Warn ^7is ^2working
Warn^62 ^7is ^2working
But then the hud fails, I only have a black screen :|

And if I use a loop in it then the text "7You can continue in: [number]" isn't visible @ the first try.

Re: if failure?

Posted: September 21st, 2010, 7:27 pm
by Drofder2004
Are you trying this on a server or just through mod tools?
Developer 1 or 0?

Re: if failure?

Posted: September 21st, 2010, 7:59 pm
by Moustache
Drofder2004 wrote:Are you trying this on a server or just through mod tools?
Developer 1 or 0?
On a dedicated 1 server.
I have not defined developer so I think it is 0.

I can place it online tomorrow on a dedicated 2 server and then try it, but would that make any difference?

Re: if failure?

Posted: September 21st, 2010, 9:56 pm
by Drofder2004
Moustache wrote:but would that make any difference?
Potentially.

But I cannot see a problem with the code, which is why I turn to the server setup.

Re: if failure?

Posted: September 22nd, 2010, 7:26 am
by Moustache
K, I will test it after school.

Re: if failure?

Posted: September 22nd, 2010, 4:18 pm
by Moustache
It only works the first time. The second time I just get the same shit at my home host. A black screen without any text :(

Re: if failure?

Posted: September 22nd, 2010, 7:31 pm
by Drofder2004
try placing a "0.05" wait after your "destroy()" threads.

Re: if failure?

Posted: September 22nd, 2010, 7:56 pm
by Moustache
Drofder2004 wrote:try placing a "0.05" wait after your "destroy()" threads.
That gives the same failure :?

Re: if failure?

Posted: September 22nd, 2010, 9:55 pm
by Drofder2004
Try removing everything but the warning text (comment everything else out).
Also try using setShader on the ones with text, instead of text to see if they are being drawn at all.

Re: if failure?

Posted: September 23rd, 2010, 6:51 am
by Moustache
When I replace both text lines for shades it works perfect, even after a reconnect.
How is that possible?
Is there something special about those text lines?

Re: if failure?

Posted: September 24th, 2010, 7:37 am
by Moustache
Should I run the script as a players thread or a level thread?

Re: if failure?

Posted: September 24th, 2010, 7:35 pm
by Drofder2004
Sorry, was too tired to look further into this yesterday and the same applies today.
I am totally stumped on why the text is not appearing, by I suggest using a level variable with a precached text, and see if that works.

Re: if failure?

Posted: September 25th, 2010, 8:18 am
by Moustache
Please don't apologize. This is not your job or something like that. You are just being friendly by helping a noob with his lack of scripting skills.

I have tried to set the blackscreen and the text in 2 different threads. But then I only get both text HUD elements. But not the black screen.
I also see the two text HUD elements after a reconnect. But the blackscreen is taking a trip to an other dimension or so, I don't know where it is.

Re: if failure?

Posted: September 25th, 2010, 4:11 pm
by Drofder2004
you have not added your wait in your blackscreen function, the moment you create the screen you are deleting it.
Add a "wait 20;" before your delete "if(isDefined)2 at the bottom of the blackscreen function.