[r4185]Bug:GetLineUDMFInt dysfunctional? Attached Example.

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 a reply

Smilies
:D :) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :geek: :ugeek: :!: :?: :idea: :arrow: :| :mrgreen: :3: :wub: >:( :blergh:
View more smilies

BBCode is OFF
Smilies are ON

Topic review
   

Expand view Topic review: [r4185]Bug:GetLineUDMFInt dysfunctional? Attached Example.

Re: [r4185]Bug:GetLineUDMFInt dysfunctional? Attached Exampl

by xtkaythen » Tue Mar 19, 2013 5:40 pm

/le-dumb

is there a reason that invalid targets don't produce at least a warning? i imagine logging a "warning: field not found" couldn't hurt foward compatibility

Re: [r4185]Bug:GetLineUDMFInt dysfunctional? Attached Exampl

by Graf Zahl » Mon Mar 18, 2013 3:42 am

From the UDMF specs:
For purposes of forward compatibility, user-defined fields are restricted to
beginning with the string "user_", but are otherwise normal identifiers.
Implementing editors should not restrict the entry of custom field names to
those beginning with "user_", however, in order to avoid problems with
out-of-date configurations.
It is fully intentional that other keys cannot be queried. The UDMF specification explicitly prohibits it.

[r4185]Bug:GetLineUDMFInt dysfunctional? Attached Example.

by xtkaythen » Sun Mar 17, 2013 7:59 pm

GetLineUDMFInt don't work. Attached example wad is two sectors, one inside the other. One linedef (not sidedef) of the inner sector has the custom user key (called property in DB2) named "triggertype", an integer, with the value of 15. Said line is tagged 3. This same line, onuse, repeatableaction, will execute script 01.

Scriptlump is simply as follows:

Code: Select all

#include "zcommon.acs"

script 01 (void)
{
  log(i:GetLineUDMFInt(3, "triggertype")); //int lineid, string fieldname
}
For all intents and purposes, the player should see 15 in the console and upper left corner, correct? 'Fraid not.

Regardless of tag number, field name, field value, direct usage or preloading in a variable in a script, it returns 0. It also returns 0 if triggertype is not defined. that's totally unexpected behavior for a really big error like that.

You can even open it up in SLADE3 and scroll to line 118 - 131 to look at the linedef def ( :lol: ) ; triggertype is defined.

tl;dr GetLineUDMFInt seems to always = 0; even when acting on invalid targets.
Attachments
GetLineUDMFIntDontWork.wad
(2.96 KiB) Downloaded 22 times

Top