Jump to content
  • 0

Why isn't this HudMessage script working?


Johnny_Vicc_007

Question

Hello guys, I'm trying to create a HudMessage script, saying the name of the first level. However, it's not working; I had watched Chubzdoomer's tutorial teaching how to do it, it was the video ZDoom ACS Scripting Tutorial #8 - HudMessage. I did exactly the way he did it, just changing the name, but it didn't work. Why is this happening?

 

This is the script that isn't working:

 

#include "zcommon.acs"

script 1 OPEN
{
    //void HudMessage (text; in type, int id, int color, fixed x, fixed y, fixed holdTime [, fixed alpha]);
    
    SetFont("BIGFONT");
    HudMessage(s:"Enchanted Lagoons Zone - Act 1"; HUDMSG_PLAIN, 1, CR_WHITE, 0.5, 0.1, 4.0);
}

 

1548861917_Capturadetela2024-04-09172942.png.7caf323aa78c6d2562d4bd57d2cee49c.png

Share this post


Link to post

3 answers to this question

Recommended Posts

  • 0
1 minute ago, Stabbey said:

Each script has a number.

 

You called one script "LadderClimb". That's not valid, it has to be a number. Try changing it to a number.

 

 

 

No, they don't have to have a number. Named scripts are perfectly fine for GZDoom. The issue obviously is that zcommon.acs is being included twice, just like the error line shows and the error message is probably reporting.

Share this post


Link to post
  • 0
16 hours ago, boris said:

 

Não, eles não precisam ter um número. Scripts nomeados são perfeitamente adequados para GZDoom. Obviamente, o problema é que zcommon.acs está sendo incluído duas vezes, assim como a linha de erro mostra e a mensagem de erro provavelmente está sendo relatada.

I didn't know that if I added two #include zcommon.acs, the script wouldn't work. I'm still very much a beginner when it comes to programming in GZDoom; this was the second script I programmed in GZDoom. So, I apologize if I didn't make it clear in the post that I'm still a beginner.

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...