Hudmessage and compiling

Ask about ACS, DECORATE, ZScript, or any other scripting questions here!

Moderator: GZDoom Developers

Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.

Hudmessage and compiling

Postby idiotboy » Wed Jan 06, 2021 8:53 am

What's wrong with this, it keeps saying hudmessage has a missing required argument whenever I compile, but looking at other times I used it, and it looks pretty correct to me, what's wrong with it? (the first use not the second) I even tried putting the [alpha] argument but nothing worked.


Code: Select allExpand view
script 10 (void)
{
   hudmessage(s:"Holy shit, a secret switch, now onwards to a secret level!": HUDMSG_PLAIN, 5, CR_GOLD, 0.5, 0.5, 4.0);
   delay(140);
   hudmessage(s:"But first, we can't have you leave with all those weapons"; HUDMSG_PLAIN, 6, CR_GOLD, 0.5, 0.5, 3.0);
   delay(105);
   DamageThing(0)
}
idiotboy
 
Joined: 26 Nov 2020
Discord: 6783
Operating System: Windows 10/8.1/8/201x 64-bit

Re: Hudmessage and compiling

Postby m8f » Wed Jan 06, 2021 9:25 am

There is : instead of ; in that line.
User avatar
m8f
dreamer
 
 
 
Joined: 29 Dec 2017
Location: Siberia (UTC+7)
Discord: m8f#0629
Github ID: mmaulwurff
Operating System: Debian-like Linux (Debian, Ubuntu, Kali, Mint, etc) 64-bit

Re: Hudmessage and compiling

Postby MFG38 » Thu Jan 07, 2021 4:33 am

idiotboy wrote:I even tried putting the [alpha] argument but nothing worked.


The alpha argument is optional, so it shouldn't be the cause of any errors. m8f caught the culprit - the symbol after the string should be ; instead of :.
User avatar
MFG38
 
Joined: 14 Apr 2019
Location: Finland
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia (Modern GZDoom)

Re: Hudmessage and compiling

Postby idiotboy » Thu Jan 07, 2021 1:33 pm

m8f wrote:There is : instead of ; in that line.

Ah, I didn't even notice that, thanks!
idiotboy
 
Joined: 26 Nov 2020
Discord: 6783
Operating System: Windows 10/8.1/8/201x 64-bit


Return to Scripting

Who is online

Users browsing this forum: Player701 and 1 guest