#(flazockt) add an assignment not working

130 messages · Page 1 of 1 (latest)

signal locust
#

^^

civic orioleBOT
pseudo eagleBOT
#

(flazockt) add an assignment not working

pseudo eagleBOT
#

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.

signal locust
#

!haste

bold beaconBOT
signal locust
#

alr tryed to: and script:

spare dagger
#

'not working'

signal locust
#

srry

#

i meant idk how

#

am i banned or smth ;/

spare dagger
#

what? banned from what? do a bit of problem solving

#

Do you need help with the first steps of that?

signal locust
#

Error Message: entry[43132a].spawned_npc is an invalid NPC! ... Enable debug on the script for more information.

low adder
#

did you read the last part of the message

#

:p

signal locust
#

19:51:48 Additional Error Info: Woah! Invalid arguments were specified!

low adder
#

which argument?

#

!debug

bold beaconBOT
# low adder !debug
Info: debug

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!

signal locust
low adder
#

it looks like you have debugging disabled, so you cannot debug

#

you should enable debugging mode to debug

signal locust
#

how to ;/

low adder
#

are you sure you don't have debug: false on your script?

signal locust
#

only on the entity container

#

in

spare dagger
#

then you have it disabled on the server level

#

should be an option in your config

signal locust
#

ty

#

i should remove the scripts that arent working

low adder
#

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?

signal locust
#

i dont think so

#

now i remove all debug: false

#

removed

low adder
#
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?

signal locust
#

yes

low adder
signal locust
#

the phantom spawnes but it doesnt have the assignment

bold beaconBOT
# low adder !logcheck https://paste.denizenscript.com/View/131555
Server Version

Paper version 1.21.4-126-fb5b173 (MC: 1.21.4)

Plugin Version(s)

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:)

Checked For

@low adder

UUID Version

4 (:white_check_mark: Online)

Java Version

21.0.3 :white_check_mark:

Other Noteworthy Plugin(s)

WorldGuard: 7.0.13-beta-2+5c4848b, ProtocolLib: 5.3.0-SNAPSHOT-723, Quests: 1.0.4, BeautyQuests: 1.0.4

Possibly Relevant Plugin(s)

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.

mossy bolt
#

Also

#

!c assignment

bold beaconBOT
# mossy bolt !c assignment
Required Plugins or Platforms

Citizens

Group

npc

Syntax

assignment [set/add/remove/clear] (script:<name>) (to:<npc>|...)

Short Description

Changes an NPC's assignment.

Description

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'.

mossy bolt
#

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.

mild talonBOT
#
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.)

#

@signal locust

signal locust
mossy bolt
olive oriole
#

@signal locust wait a couple ticks until the npc is fully spawned

#

also

#

!c create tags

bold beaconBOT
# olive oriole !c create tags
Required Plugins or Platforms

Citizens

Group

npc

Syntax

create [<entity>] [<name>] (<location>) (traits:<trait>|...) (registry:<name>)

Short Description

Creates a new NPC, and optionally spawns it at a location.

Description

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.

Related Tags

<server.npcs> Returns a list of all NPCs.
<entry[saveName].created_npc> returns the NPC that was created.

olive oriole
#

it's created_npc, not spawned_npc

olive oriole
signal locust
mossy bolt
#

Wait what.

olive oriole
#

!lang player and npc

bold beaconBOT
# olive oriole !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 ...

Group

Script Command System

mossy bolt
#

!c create

bold beaconBOT
# mossy bolt !c create
Required Plugins or Platforms

Citizens

Group

npc

Syntax

create [<entity>] [<name>] (<location>) (traits:<trait>|...) (registry:<name>)

Short Description

Creates a new NPC, and optionally spawns it at a location.

Description

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.

mossy bolt
#

Oh wow.

#

How did I miss that.

signal locust
#

i missed that too

mossy bolt
#

It's easy enough to confused spawned with created

olive oriole
#

you might still have to wait a couple of ticks though

signal locust
#

ok!

olive oriole
signal locust
#

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?

mossy bolt
#

So I might be out of the loop but

#

firewyvernmob isn't a vanilla mob, what is this?

signal locust
#

its just an npc i named xd

#

its just a phantom with a name

#

(an npc)

mossy bolt
#

I'm confused, it takes an entity type or an existing npc to copy it seems?

#

Alright, sure.

signal locust
#

entity type

mossy bolt
#

But firewyvernmob isn't an entity type, so how is it making a phantom???

signal locust
#

entity container

mossy bolt
#

That

#

A moment.

signal locust
#

i have seen it but i didnt find an example

mossy bolt
#

#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.

signal locust
#

is a !itworks a big thing?

mossy bolt
#

It's

#

!itworks

bold beaconBOT
# mossy bolt !itworks
Info: itworks

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/

signal locust
#

ohhh

mossy bolt
#

Regardless.

signal locust
#

xd

mossy bolt
#

!t server.npcs_assigned

bold beaconBOT
mossy bolt
#

This may work for you.

#

Otherwise.

#

!t server.npcs_flagged

bold beaconBOT
mossy bolt
#

Alternatively, keep track of them in a server flag instead but I feel these may be the easier solution.

signal locust
#

so i can use "if <server.npc_flagged[firewyvernflag]> == 4"

mossy bolt
#

Returns listtag

#

!t listtag.size

bold beaconBOT
sweet solsticeBOT
signal locust
#

ok

#

if <server.npc_flagged[firewyvernflag].size> == 4

mossy bolt
#

npcs_flagged sure.

#

Why not just use npcs_assigned?

signal locust
#

bc it could be possible the i accedently assigned some other npcs

#

but ok

#

ill use that

#

ty for helping

mossy bolt
#

If this is all then

mild talonBOT
#
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.)

#

@signal locust