[IMDUMB]Function causing errors if name ends with "Damage"?

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.

[IMDUMB]Function causing errors if name ends with "Damage"?

Postby nova++ » Sun Oct 10, 2021 1:27 pm

So, I have a function called BlastWaveDamage in a base class. In an inherited class, I call this function. And it reports the function doesn't exist:

Code: Select allExpand view
Script error, "./content/weapons/common/:zscript/dynamite.zs" line 317:
BlastWaveDamage is not a member function of DynamiteProjectile
Script error, "./content/weapons/common/:zscript/dynamite.zs" line 317:
Call to unknown function 'BlastWaveDamage'


Then if I call "Super.BlastWaveDamage" it works.

But if I rename it to just "BlastWave" or even "BlastWaveDamag" it works just fine, too, even without calling Super.

What the heck. I am super duper confused. I have been combing through the docs but nothing is really catching my eye. Did I find a bug or is this some weird undocumented behavior for damage functions?


I'm dumb and you should ignore me (see post 3)
Last edited by nova++ on Mon Oct 11, 2021 2:24 am, edited 2 times in total.
User avatar
nova++
Real life space alien (not fake)
 
Joined: 04 Sep 2021
Discord: PM me!
Operating System: Debian-like Linux (Debian, Ubuntu, Mint, etc) 64-bit

Re: [zscript]Function causing errors if name ends with "Dama

Postby Blue Shadow » Sun Oct 10, 2021 8:36 pm

Could you post the relevant code?
User avatar
Blue Shadow
 
Joined: 14 Nov 2010
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: ATI/AMD (Modern GZDoom)

Re: [zscript]Function causing errors if name ends with "Dama

Postby nova++ » Mon Oct 11, 2021 2:18 am

CAN YOU TELL I HAVEN'T BEEN GETTING MUCH SLEEP LATELY.

Image

Carry on with your days. Please place me into the hall of shame.

In my defense, after years of C# and friends I still have a lot of trouble getting used to ZScript being case insensitive. It's like it goes against my muscle memory.
User avatar
nova++
Real life space alien (not fake)
 
Joined: 04 Sep 2021
Discord: PM me!
Operating System: Debian-like Linux (Debian, Ubuntu, Mint, etc) 64-bit


Return to Scripting

Who is online

Users browsing this forum: No registered users and 0 guests