[SOLVED] Error from the Log function?

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.

Please bear in mind that the people helping you do not automatically know how much you know. You may be asked to upload your project file to look at. Don't be afraid to ask questions about what things mean, but also please be patient with the people trying to help you. (And helpers, please be patient with the person you're trying to help!)
Post Reply
User avatar
Pyhrrous
Posts: 16
Joined: Tue Jul 14, 2020 6:11 pm

[SOLVED] Error from the Log function?

Post by Pyhrrous »

Hey, I'm still relatively new here I think -- I barely interact on the forum -- and I was looking to get a bit of help with ZScript.

While I'm also about equally inexperienced working with ZScript, I've been programming in other languages for a while. Right now I'm working on an edit of Ivory Duke's ZMovement mod for personal use, and attempting to trace the code to understand it better, but the Log function appears to throw an error at compile. I copied the ZScript example from the ZDoom wiki and inserted it into the PlayerThink function, but when I try to open the mod in GZDoom it points out the Log function with "Named arguments not supported here" and doesn't run.

What is it that I'm doing incorrectly here? Should I be using a different function to trace code?
Last edited by Pyhrrous on Sun Nov 14, 2021 10:59 am, edited 1 time in total.
User avatar
MFG38
Posts: 414
Joined: Sun Apr 14, 2019 8:26 am
Graphics Processor: nVidia (Modern GZDoom)
Location: Finland
Contact:

Re: Error from the Log function?

Post by MFG38 »

Show the code. Easier to help you when we too know exactly what's going on.
User avatar
Pyhrrous
Posts: 16
Joined: Tue Jul 14, 2020 6:11 pm

Re: Error from the Log function?

Post by Pyhrrous »

MFG38 wrote:Show the code. Easier to help you when we too know exactly what's going on.
Sure, here you go:
Capture.PNG
If you want to look at the full code, I've also uploaded a .txt file with everything on it here.
stuff.txt
(95.06 KiB) Downloaded 12 times
And, just for complete clarity, here's the error I get when I attempt to run the .pk3 file:
Capture.PNG
User avatar
SanyaWaffles
Posts: 871
Joined: Thu Apr 25, 2013 12:21 pm
Preferred Pronouns: They/Them
Operating System Version (Optional): Windows 11 for the Motorola Powerstack II
Graphics Processor: nVidia with Vulkan support
Location: The Corn Fields
Contact:

Re: Error from the Log function?

Post by SanyaWaffles »

use A_Log instead.
User avatar
m8f
 
 
Posts: 1466
Joined: Fri Dec 29, 2017 4:15 am
Preferred Pronouns: He/Him
Location: Siberia (UTC+7)
Contact:

Re: Error from the Log function?

Post by m8f »

What SanyaWaffles says, and the syntax is

Code: Select all

A_Log("You've been granted Quad Damage!");
(without "s:"). ":s" is syntax for ACS Log function.
User avatar
Pyhrrous
Posts: 16
Joined: Tue Jul 14, 2020 6:11 pm

Re: Error from the Log function?

Post by Pyhrrous »

Works like a charm. Thanks, everyone!
Post Reply

Return to “Scripting”