I dont get this bs, I narrate the tags and it's all correct, yet the filter just does not want to work...
Narrating <server.flag[podracing.players].first.as[player].flag[podracing.vehicle_ent]> gives the correct uuid
narrating <context.vehicle.uuid> gives the same correct uuid
<server.flag[podracing.players].first.as[player].flag[podracing.vehicle_ent].equals[<context.vehicle.uuid>]> correctly returns true,
but when I use it in a filter, it all breaks:
<server.flag[podracing.players].filter_tag[<[filter_value].as[player].flag[podracing.vehicle_ent].equals[<context.vehicle.uuid>]>].first> I also tried .filter but same issue...
#(JustinS) filter not filtering again
29 messages · Page 1 of 1 (latest)
(JustinS) filter not filtering again
Hi I'm AutoThreadBot! Don't mind me, I'll just be adding the helper team to this thread so they can see it. A human will get to you soon.
podracing.players is a list of uuids
podracing.vehicle_ent is also a uuid
oh wait
oh ffs
I was missing .as[player] at the end
Rubber 🦆 method
Why are you not already storing PlayerTags though?
Would avoid a lot of confusion like this
bcs someone told me to not store raw objects
Youuuu might be confusing it with using raw objects as keys or for comparison - the warnings about raw objects is that their formats aren't guaranteed and may change in the future, so doing - if <[world]> == w@main isn't safe because it might be w@[name=main;uuid=312613-3613] in the future, and having w@main as a map key isn't safe for the same reason; as opposed to .name, which will always be main
Using it as a value on the other hand (I.e. something that doesn't get directly compared) is fine, because if you try reading that value later and Denizen sees w@world, it'll know "Oh okay, old format, lets parse it and return a modern WorldTag"
The reason for the comparison bit is because - if <[world]> == w@main is comparing text, it's checking if the raw text of the WorldTag object is eqaul to w@main.
If you were doing - if <[world]> == <player.world> that'd be fine, because it isn't a text comparison, you're comparing two WorldTag objects
Because map keys are text, I.e. the key isn't that player, it's p@326-436124-g424h2
hm I see
So if it suddenly becomes p@name;uuid or whatever for example, It would try checking my_flag.p@guy;246-246-26 instead of my_flag.p@246-246-26
But if you used the .uuid, it would always be my_flag.246-246-26, no matter what the raw object format is
The main point is whether it's an object being stored or the raw object text being stored - if it's the actual object (I.e. in values), Denizen will find it and know how to parse it even if it's an old format.
If it's text and your code tries using <player> as the key, Denizen can't know it should check for both p@name;uuid and p@uuid in the map
Hopefully that all makes sense lol, feel free to ask if there's any part that isn't clear
Otherwise -
Thread Closing Reminder
Has your issue been resolved, or your question been answered?
If so, please use the </resolved:1028673926114594866> command to close your thread.
Or </invalid:1028673926898909185> if it's not possible to resolve.
If not yet resolved, please reply below to tell us what you still need.
(Note that if there is no reply for a few days, this thread will eventually close itself.)
@silent crescent