#(flazockt) add an assignment not working
130 messages · Page 1 of 1 (latest)
(flazockt) add an assignment not working
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.
!haste
Help us help you by pasting your script to https://paste.denizenscript.com/New/Script and linking it back here.
Content of Denizen Script Paste #131550: aa... pasted 2025/03/04 10:13:23 UTC-08:00, Paste length: 202 characters across 5 lines, Content: firewyvernspawntest: type: task script: - create firewyvernmob 1234 save:43132a
alr tryed to: and script:
'not working'
what? banned from what? do a bit of problem solving
Do you need help with the first steps of that?
the debug says me that the define thing isnt working
Error Message: entry[43132a].spawned_npc is an invalid NPC! ... Enable debug on the script for more information.
19:51:48 Additional Error Info: Woah! Invalid arguments were specified!
If you need help with a script issue, one of the most powerful tools Denizen has to offer is full debug output. This is displaying in your console whenever scripts are running until you turn debug off. To share a debug log quickly and easily with helpers, simply run the command /denizen debug -r in-game to begin recording, then run through the part of the script you need help with, then run the command /denizen submit. This will give you a link to a paste of the debug log, which you can then copy/paste back to us!
Content of Server Log Paste #131552: Denizen Debug Logs From AAZwruneAA... pasted 2025/03/04 10:51:50 UTC-08:00, Paste length: 33234 characters across 219 lines, Content: Java Version: 21.0.3 Up-time: 3m 16s Denizen Version: Core: 1.91.0-SNAPSHOT (Build 1395), Spigot: 1.3.1-SNAPSHOT (build 7134-DEV) Script Containers: 389, Events: 131
it looks like you have debugging disabled, so you cannot debug
you should enable debugging mode to debug
how to ;/
are you sure you don't have debug: false on your script?
ty
Content of Server Log Paste #131554: Denizen Debug Logs From AAZwruneAA... pasted 2025/03/04 10:56:35 UTC-08:00, Paste length: 76701 characters across 499 lines, Content: Java Version: 21.0.3 Up-time: 8m 1s Denizen Version: Core: 1.91.0-SNAPSHOT (Build 1395), Spigot: 1.3.1-SNAPSHOT (build 7134-DEV) Script Containers: 389, Events: 131
i should remove the scripts that arent working
Content of Server Log Paste #131554: Denizen Debug Logs From AAZwruneAA... pasted 2025/03/04 10:56:35 UTC-08:00, Paste length: 76701 characters across 499 lines, Content: Java Version: 21.0.3 Up-time: 8m 1s Denizen Version: Core: 1.91.0-SNAPSHOT (Build 1395), Spigot: 1.3.1-SNAPSHOT (build 7134-DEV) Script Containers: 389, Events: 131
FIREWYVERNSPAWNTEST has debug disabled
(if your config is enabled, anyways)
did you maybe have debug: false before and not reload the script after removing it?
i dont think so
Content of Server Log Paste #131555: Denizen Debug Logs From AAZwruneAA... pasted 2025/03/04 10:58:56 UTC-08:00, Paste length: 1102393 characters across 8654 lines, Content: Java Version: 21.0.3 Up-time: 10m Denizen Version: Core: 1.91.0-SNAPSHOT (Build 1395), Spigot: 1.3.1-SNAPSHOT (build 7134-DEV) Script Containers: 389, Events: 131
now i remove all debug: false
removed
19:58:53 Additional Error Info: Tag-base 'entry' returned null. 19:58:53 Additional Error Info: Tag <entry[43132a].spawned_npc> is invalid! 19:58:53 Additional Error Info: Unfilled or unrecognized sub-tag(s) 'spawned_npc' for tag <entry[43132a].spawned_npc>! ```
it looks like the entry tag failed, so it can't add the assignment to it
is the NPC getting created at all?
yes
Content of Server Log Paste #131555: Denizen Debug Logs From AAZwruneAA... pasted 2025/03/04 10:58:56 UTC-08:00, Paste length: 1102393 characters across 8654 lines, Content: Java Version: 21.0.3 Up-time: 10m Denizen Version: Core: 1.91.0-SNAPSHOT (Build 1395), Spigot: 1.3.1-SNAPSHOT (build 7134-DEV) Script Containers: 389, Events: 131
the phantom spawnes but it doesnt have the assignment
Paper version 1.21.4-126-fb5b173 (MC: 1.21.4)
Citizens: 2.0.37-SNAPSHOT (build 3710) -- (:warning:Outdated build, behind by 40)
Denizen: 1.3.1-SNAPSHOT (build 7134-DEV) -- (:warning:Outdated build, behind by 7)
Depenizen: 2.1.1 (build 873) -- (Current build :white_check_mark:)
Sentinel: 2.9.2-SNAPSHOT (build 528) -- (Current build :white_check_mark:)
@low adder
4 (:white_check_mark: Online)
21.0.3 :white_check_mark:
WorldGuard: 7.0.13-beta-2+5c4848b, ProtocolLib: 5.3.0-SNAPSHOT-723, Quests: 1.0.4, BeautyQuests: 1.0.4
TAB: 4.1.6 - This plugin adds Below_Name scoreboards to NPCs.
Multiverse-Core: 4.3.1-b861 - Multi-world configuration plugins may affect NPCs in unexpected ways.
Make sure you're up to date first, this could be a paper/old citizens bug.
Also
!c assignment
Citizens
npc
assignment [set/add/remove/clear] (script:<name>) (to:<npc>|...)
Changes an NPC's assignment.
Changes an NPC's assignment as though you used the '/npc assignment' command.
Uses the script: argument, which accepts an assignment-type script.
Optionally, specify a list of NPCs to apply the trait to. If unspecified, the linked NPC will be used.
'Set' is equivalent to 'clear' + 'add'.
I believe you're missing the correct syntax.
You're supplying a script name, and then using npc: which is not a valid argument.
Check the usage examples.
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.)
@signal locust
Alr tryed them
Submit a debug then of you attempting the proper usage
@signal locust wait a couple ticks until the npc is fully spawned
also
!c create tags
Citizens
npc
create [<entity>] [<name>] (<location>) (traits:<trait>|...) (registry:<name>)
Creates a new NPC, and optionally spawns it at a location.
Creates an npc which the entity type specified, or specify an existing npc to create a copy.
If no location is specified the npc is created despawned.
Use the 'save:<savename>' argument to return the npc for later use in a script.
Optionally specify a list of traits to immediately apply when creating the NPC.
Optionally specify a custom registry to create the NPC into. (Most users, leave this option off).
Will generate a new registry if needed.
<server.npcs> Returns a list of all NPCs.
<entry[saveName].created_npc> returns the NPC that was created.
it's created_npc, not spawned_npc
That's the global npc: arg which is valid usage
ILL TRY THAT
Wait what.
!lang player and npc
The "player:<player>" and "npc:<npc>" arguments are special meta-arguments that are available for all commands, but are only useful for some.
They are written like:
- give stick player:<server.flag[some_player]>
or: - sit npc:<entry[save].created_npc>
Denizen tracks a "linked player" and a "linked NPC" in queues and the commands within.
Many commands automatically operate on the linked player/NPC default or exclusively
(for example, "give" defaults to giving items to the linked player but that can be changed with the "to" argument,
"sit" exclusively makes the linked NPC sit, and that cannot be changed except by the global NPC argument).
When the player argument is used, it sets the linked player for the specific command it's on.
This is only useful for commands that default to operating ...
Script Command System
!c create
Citizens
npc
create [<entity>] [<name>] (<location>) (traits:<trait>|...) (registry:<name>)
Creates a new NPC, and optionally spawns it at a location.
Creates an npc which the entity type specified, or specify an existing npc to create a copy.
If no location is specified the npc is created despawned.
Use the 'save:<savename>' argument to return the npc for later use in a script.
Optionally specify a list of traits to immediately apply when creating the NPC.
Optionally specify a custom registry to create the NPC into. (Most users, leave this option off).
Will generate a new registry if needed.
i missed that too
It's easy enough to confused spawned with created
you might still have to wait a couple of ticks though
ok!

IT WORKS
i have only one question left, is there any way of knowing how many firewyvern are in the server
do i use a server flag or do i use foreach?
I'm confused, it takes an entity type or an existing npc to copy it seems?
Alright, sure.
entity type
But firewyvernmob isn't an entity type, so how is it making a phantom???
entity container
entity script container
how do i copy an npc in an create command?
i have seen it but i didnt find an example
#1098337641314922526 message I remember making a thread regarding this nearly identical thing, and basically being told that using entity script containers is a !itworks am I misinterpreting this?
That aside.
is a !itworks a big thing?
Many newer scripters tend to not realize the important difference between "it works" and "it is correct". Just because a script works does not mean everything's fine.
Helpers are encouraged to refuse to continue helping a user with the "if it works it's good enough" mindset until they fix all the things that are wrong (but seem to work) in their script.
Read a longer writeup explaining this idea on the forum here: https://forum.denizenscript.com/threads/public-information-writeup-the-it-works-fallacy.265/
ohhh
Regardless.
xd
!t server.npcs_assigned
Returns a list of all NPCs assigned to a specified script.
ListTag(NPCTag)
Returns a list of all NPCs with a specified flag set.
Can use "!<flag_name>" style to only return NPCs *without* the flag.
ListTag(NPCTag)
Alternatively, keep track of them in a server flag instead but I feel these may be the easier solution.
so i can use "if <server.npc_flagged[firewyvernflag]> == 4"
Returns the size of the list.
ElementTag(Number)
# Narrates '3'
- narrate <list[one|two|three].size>
Tag parse results for <server.players>: https://paste.denizenscript.com/View/131572
li@p@460e96b9-7a0e-416d-b2c3-4508164b8b1b|
Tag parse results for <server.players.size>: https://paste.denizenscript.com/View/131573
1
bc it could be possible the i accedently assigned some other npcs
but ok
ill use that
ty for helping
If this is all then
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.)
@signal locust