#help with coords

1 messages · Page 1 of 1 (latest)

wise crow
#

What is the issue

dry minnow
#

line 5

#

i need help with line 5

#

after the trigger:

wise crow
dry minnow
#

i started yesterday

#

im trying to learn

wise crow
#

ok

dry minnow
#

can you help or not

wise crow
#

Of course

#

YOu are using spawn zombie at location

#

Now, since it's a function, skript doesn't know what location you are talking about

#

In events such as on block break:, you won't get this error, because it is clear that you are referring to the location of the block

zinc field
#

il fix it

wise crow
#

You have to be more specific. What location are you trying to spawn the zombie at?

#

Why?

dry minnow
#

its in the code

zinc field
#

command spawnmob [<text>]:
permission: op

trigger:
      location = location(-1008, 123, 3755, world)
      if arg-1 is set:
        spawnmob(arg-1, player)
    else:
        message "&4Invalid arguments! Usage: /spawnmob <name> <hp>"

function spawnmob(m: text, p: player):
if {_m} is "zombietest":
spawn 1 zombie at location
set {_e} to last spawned entity
equip {_e} with gold helmet
equip {_e} with gold chestplate
equip {_e} with gold leggings
equip {_e} with gold boots
set max health of {_e} to 100
heal {_e}
set {_e}'s display name to "&4Zombie &lTEST"

dry minnow
#

the coords

zinc field
#

command spawnmob [<text>]:
permission: op

trigger:
      location = location(-1008, 123, 3755, world)
      if arg-1 is set:
        spawnmob(arg-1, player)
    else:
        message "&4Invalid arguments! Usage: /spawnmob <name> <hp>"

function spawnmob(m: text, p: player):
if {_m} is "zombietest":
spawn 1 zombie at location
set {_e} to last spawned entity
equip {_e} with gold helmet
equip {_e} with gold chestplate
equip {_e} with gold leggings
equip {_e} with gold boots
set max health of {_e} to 100
heal {_e}
set {_e}'s display name to "&4Zombie &lTEST"

#

this will prob fix 1 error

dry minnow
#

ok

wise crow
# dry minnow the coords

This isn't how skript works. You have to pass the location as a parameter in the function in order to let it know what its value is

dry minnow
#

made it worse

dry minnow
#

i saw this somewhere so i used it

zinc field
dry minnow
zinc field
#

il fix it

#

i cant srry im stupid

dry minnow
#

ok

#

thx anyway

zinc field
#

@wise crow you can you help me rq

#
on right click:
  if item is Clock:
    open {_ServerSelector} to player
    set {_ServerSelector} to a new chest inventory named "&8Server Selector"
    set slot 0 and 1 and 2 and 3 and 4 and 5 and 6 and 7 and 8 and 9 and 10 and 12 and 14 and 16 and 17 and 18 and 19 and 20 and 21 and 22 and 23 and 24 and 25 and 26 of {_ServerSelector} to gray stained glass pane named " "```
zinc field
zinc field
wise crow
#

There is a functions tutorial, you would learn much faster by reading it

dry minnow
#

i dont need help now

#

fixed it 1 min after writing this

wise crow
#

oh