Args[] expression is not working in an anonymous function

Bugs that have been investigated and resolved somehow.

Moderator: GZDoom Developers

Forum rules
Please don't bump threads here if you have a problem - it will often be forgotten about if you do. Instead, make a new thread here.
Post Reply
User avatar
SPZ1
Posts: 244
Joined: Wed Aug 02, 2017 3:01 pm
Location: Illinois
Contact:

Args[] expression is not working in an anonymous function

Post by SPZ1 »

Just what the title says: Args[] expression is not working in an anonymous function!
Attachments
Args_test.zip
(1.6 KiB) Downloaded 26 times
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49056
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Args[] expression is not working in an anonymous functio

Post by Graf Zahl »

This is not surprising because CustomInventory state chains use the player as its caller. So you are checking the player's args.
To get around this, you have to use ZScript where you can access the item via the 'invoker' pointer. In DECORATE this cannot be done.
User avatar
SPZ1
Posts: 244
Joined: Wed Aug 02, 2017 3:01 pm
Location: Illinois
Contact:

Re: Args[] expression is not working in an anonymous functio

Post by SPZ1 »

Thank You for pointing me in the right direction then! I found this page which describes this : https://zdoom.org/wiki/Using_pointers_in_ZScript
Post Reply

Return to “Closed Bugs [GZDoom]”