if failure?

Have a question about modding, modelling or skinning? Have a tutorial to post? Post here!

Moderator: Core Staff

User avatar
Drofder2004
Core Staff
Core Staff
Posts: 13313
Joined: April 13th, 2005, 8:22 pm
Location: UK, London

Re: if failure?

Post by Drofder2004 » September 21st, 2010, 6:18 pm

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.
Image
Virgin Media 20Mb Broadband:
"Perfect for families going online at the same time, downloading movies, online gaming and more."
Borked internet since: 22-07-2010

Moustache
CJ Worshipper
CJ Worshipper
Posts: 476
Joined: August 18th, 2008, 9:30 am

Re: if failure?

Post by Moustache » September 21st, 2010, 7:15 pm

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.
Last edited by Moustache on September 23rd, 2010, 6:55 am, edited 1 time in total.

User avatar
Drofder2004
Core Staff
Core Staff
Posts: 13313
Joined: April 13th, 2005, 8:22 pm
Location: UK, London

Re: if failure?

Post by Drofder2004 » September 21st, 2010, 7:27 pm

Are you trying this on a server or just through mod tools?
Developer 1 or 0?
Image
Virgin Media 20Mb Broadband:
"Perfect for families going online at the same time, downloading movies, online gaming and more."
Borked internet since: 22-07-2010

Moustache
CJ Worshipper
CJ Worshipper
Posts: 476
Joined: August 18th, 2008, 9:30 am

Re: if failure?

Post by Moustache » September 21st, 2010, 7:59 pm

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?

User avatar
Drofder2004
Core Staff
Core Staff
Posts: 13313
Joined: April 13th, 2005, 8:22 pm
Location: UK, London

Re: if failure?

Post by Drofder2004 » September 21st, 2010, 9:56 pm

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.
Image
Virgin Media 20Mb Broadband:
"Perfect for families going online at the same time, downloading movies, online gaming and more."
Borked internet since: 22-07-2010

Moustache
CJ Worshipper
CJ Worshipper
Posts: 476
Joined: August 18th, 2008, 9:30 am

Re: if failure?

Post by Moustache » September 22nd, 2010, 7:26 am

K, I will test it after school.

Moustache
CJ Worshipper
CJ Worshipper
Posts: 476
Joined: August 18th, 2008, 9:30 am

Re: if failure?

Post by Moustache » September 22nd, 2010, 4:18 pm

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 :(

User avatar
Drofder2004
Core Staff
Core Staff
Posts: 13313
Joined: April 13th, 2005, 8:22 pm
Location: UK, London

Re: if failure?

Post by Drofder2004 » September 22nd, 2010, 7:31 pm

try placing a "0.05" wait after your "destroy()" threads.
Image
Virgin Media 20Mb Broadband:
"Perfect for families going online at the same time, downloading movies, online gaming and more."
Borked internet since: 22-07-2010

Moustache
CJ Worshipper
CJ Worshipper
Posts: 476
Joined: August 18th, 2008, 9:30 am

Re: if failure?

Post by Moustache » September 22nd, 2010, 7:56 pm

Drofder2004 wrote:try placing a "0.05" wait after your "destroy()" threads.
That gives the same failure :?

User avatar
Drofder2004
Core Staff
Core Staff
Posts: 13313
Joined: April 13th, 2005, 8:22 pm
Location: UK, London

Re: if failure?

Post by Drofder2004 » September 22nd, 2010, 9:55 pm

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.
Image
Virgin Media 20Mb Broadband:
"Perfect for families going online at the same time, downloading movies, online gaming and more."
Borked internet since: 22-07-2010

Moustache
CJ Worshipper
CJ Worshipper
Posts: 476
Joined: August 18th, 2008, 9:30 am

Re: if failure?

Post by Moustache » September 23rd, 2010, 6:51 am

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?
Last edited by Moustache on September 25th, 2010, 8:13 am, edited 1 time in total.

Moustache
CJ Worshipper
CJ Worshipper
Posts: 476
Joined: August 18th, 2008, 9:30 am

Re: if failure?

Post by Moustache » September 24th, 2010, 7:37 am

Should I run the script as a players thread or a level thread?

User avatar
Drofder2004
Core Staff
Core Staff
Posts: 13313
Joined: April 13th, 2005, 8:22 pm
Location: UK, London

Re: if failure?

Post by Drofder2004 » September 24th, 2010, 7:35 pm

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.
Image
Virgin Media 20Mb Broadband:
"Perfect for families going online at the same time, downloading movies, online gaming and more."
Borked internet since: 22-07-2010

Moustache
CJ Worshipper
CJ Worshipper
Posts: 476
Joined: August 18th, 2008, 9:30 am

Re: if failure?

Post by Moustache » September 25th, 2010, 8:18 am

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.
Last edited by Moustache on September 25th, 2010, 4:21 pm, edited 1 time in total.

User avatar
Drofder2004
Core Staff
Core Staff
Posts: 13313
Joined: April 13th, 2005, 8:22 pm
Location: UK, London

Re: if failure?

Post by Drofder2004 » September 25th, 2010, 4:11 pm

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.
Image
Virgin Media 20Mb Broadband:
"Perfect for families going online at the same time, downloading movies, online gaming and more."
Borked internet since: 22-07-2010

Post Reply

Who is online

Users browsing this forum: No registered users and 29 guests