GetUserVariable reports incorrect value

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
Ed the Bat
Posts: 3060
Joined: Thu May 03, 2012 1:18 pm
Graphics Processor: nVidia with Vulkan support
Location: Maryland, US
Contact:

GetUserVariable reports incorrect value

Post by Ed the Bat »

GetUserVariable is returning false positives. Freshly-initialized variables should be zero, and checking it in DECORATE verifies this. But GetUserVariable is producing values that are very much not zero.
Attachments
uservartest.wad
(641 Bytes) Downloaded 30 times
User avatar
GFD
Posts: 347
Joined: Mon May 31, 2010 7:42 pm
Preferred Pronouns: He/Him
Location: Canada
Contact:

Re: GetUserVariable reports incorrect value

Post by GFD »

There appear to be further issues interacting with user variables from ACS. Calling SetUserVariable from ACS always seems to make ZDoom vanish.

This example has an ACS script that constantly logs the value of an uninitialized user variable on the player. If you press fire, the script sets it to 1. The correct value does get logged and displayed on the screen, and you can hear the monsters that are alerted, but it crashes immediately afterwards.
Attachments
setuservarexample.pk3
(1.27 KiB) Downloaded 28 times
User avatar
Major Cooke
Posts: 8215
Joined: Sun Jan 28, 2007 3:55 pm
Preferred Pronouns: He/Him
Operating System Version (Optional): Windows 10
Graphics Processor: nVidia with Vulkan support
Location: GZBoomer Town
Contact:

Re: GetUserVariable reports incorrect value

Post by Major Cooke »

Actually the ACS might be another bug entirely. http://forum.zdoom.org/viewtopic.php?f=2&t=50731
User avatar
Ed the Bat
Posts: 3060
Joined: Thu May 03, 2012 1:18 pm
Graphics Processor: nVidia with Vulkan support
Location: Maryland, US
Contact:

Re: GetUserVariable reports incorrect value

Post by Ed the Bat »

Strangely I have not experienced that bug.
User avatar
Major Cooke
Posts: 8215
Joined: Sun Jan 28, 2007 3:55 pm
Preferred Pronouns: He/Him
Operating System Version (Optional): Windows 10
Graphics Processor: nVidia with Vulkan support
Location: GZBoomer Town
Contact:

Re: GetUserVariable reports incorrect value

Post by Major Cooke »

There might be the issue of ACS returning a non-initialized variable as well, one so far out that it may be causing the crash. At this point, though, I'm speculating.
User avatar
Ed the Bat
Posts: 3060
Joined: Thu May 03, 2012 1:18 pm
Graphics Processor: nVidia with Vulkan support
Location: Maryland, US
Contact:

Re: GetUserVariable reports incorrect value

Post by Ed the Bat »

All I can say for sure is that the user variable does indeed hold the correct value. A_JumpIf confirmed my example's variable to be zero, as expected. But GetUserVariable(); keeps returning some other value.
_mental_
 
 
Posts: 3820
Joined: Sun Aug 07, 2011 4:32 am

Re: GetUserVariable reports incorrect value

Post by _mental_ »

Fixed here.
Post Reply

Return to “Closed Bugs [GZDoom]”