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?
[SOLVED] Error from the Log function?
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!)
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!)
[SOLVED] Error from the Log function?
Last edited by Pyhrrous on Sun Nov 14, 2021 10:59 am, edited 1 time in total.
- 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?
Show the code. Easier to help you when we too know exactly what's going on.
Re: Error from the Log function?
Sure, here you go: If you want to look at the full code, I've also uploaded a .txt file with everything on it here. And, just for complete clarity, here's the error I get when I attempt to run the .pk3 file:MFG38 wrote:Show the code. Easier to help you when we too know exactly what's going on.
- 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?
use A_Log instead.
- 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?
What SanyaWaffles says, and the syntax is
(without "s:"). ":s" is syntax for ACS Log function.
Code: Select all
A_Log("You've been granted Quad Damage!");
Re: Error from the Log function?
Works like a charm. Thanks, everyone!