#title command in functions not working

1 messages · Page 1 of 1 (latest)

merry light
#

^

#
title @a[scores={thirst=101..200}] actionbar ¼¼¼¼¼¼¼¼¼±
title @a[scores={thirst=201..300}] actionbar ¼¼¼¼¼¼¼¼¼¶
title @a[scores={thirst=301..400}] actionbar ¼¼¼¼¼¼¼¼±¶
title @a[scores={thirst=401..500}] actionbar ¼¼¼¼¼¼¼¼¶¶
title @a[scores={thirst=501..600}] actionbar ¼¼¼¼¼¼¼±¶¶
title @a[scores={thirst=601..700}] actionbar ¼¼¼¼¼¼¼¶¶¶
title @a[scores={thirst=701..800}] actionbar ¼¼¼¼¼¼±¶¶¶
title @a[scores={thirst=801..900}] actionbar ¼¼¼¼¼¼¶¶¶¶
title @a[scores={thirst=901..1000}] actionbar ¼¼¼¼¼±¶¶¶¶
title @a[scores={thirst=1001..1100}] actionbar ¼¼¼¼¼¶¶¶¶¶
title @a[scores={thirst=1101..1200}] actionbar ¼¼¼¼±¶¶¶¶¶
title @a[scores={thirst=1201..1300}] actionbar ¼¼¼¼¶¶¶¶¶¶
title @a[scores={thirst=1301..1400}] actionbar ¼¼¼±¶¶¶¶¶¶
title @a[scores={thirst=1401..1500}] actionbar ¼¼¼¶¶¶¶¶¶¶
title @a[scores={thirst=1501..1600}] actionbar ¼¼±¶¶¶¶¶¶¶
title @a[scores={thirst=1601..1700}] actionbar ¼¼¶¶¶¶¶¶¶¶
title @a[scores={thirst=1701..1800}] actionbar ¼±¶¶¶¶¶¶¶¶
title @a[scores={thirst=1801..1900}] actionbar ¼¶¶¶¶¶¶¶¶¶
title @a[scores={thirst=1901..2000}] actionbar ±¶¶¶¶¶¶¶¶¶
title @a[scores={thirst=2001..2100}] actionbar ¶¶¶¶¶¶¶¶¶¶
 
execute if @a[scores={thirst=0..200}] run effect @p weakness 10 0 true```
#

theres the code

#

and im using the new 1.19.50 manifest version

alpine escarp
#

This is wrong
execute if @a[scores={thirst=0..200}] run effect @p weakness 10 0 true

#

who did this for you....

#

just do
effect @a[scores={thirst=0..200}] weakness 10 0 true

#

your commands are over complicated.... so the titles are not working because the execute command was wrong.

#

anything wrong in a file and the whole file is not taken in

#

you can test in game by trying to run the function file manually and if can't find it, it is bad

#

also just test a command for validity by typing it in chat.... it will tell you

merry light
merry light
alpine escarp
#

I take it, you are not a programmer of.... any language?

merry light
#

eh

#

its a so so

#

i know what im doing when making entities and such

#

but when it comes to commands, im a mess

alpine escarp
#

You do not need the execute for every every thing

#

see how I just applied the selector in the effect command?

merry light
#

yeah, that makes more sense

#

execute if @a[tag=!start] run scoreboard players set @p thirst 1000
execute if @a[tag=!start] run tag @p add start```
#

is this correct though?

alpine escarp
#

test one of those executes in chat

#

should not work

#

you do not even need the executes here

#

just move the selectors to inside the commands

#

the selectors

#

@a[tag=!start]

#

instead of @p

merry light
#

is it not @a already?

alpine escarp
#

scoreboard players set @a[tag=!start] thirst 1000

merry light
#

oooohhhh

alpine escarp
#

take off the executes, you do not need them for this

merry light
#

Okay

alpine escarp
#

look at every place you are using executes and see if you really need it or not.

merry light
#

alright

#

i think this is the only command that wasnt working

alpine escarp
#

if you are using it to call a function that will operate on one person in the @s mode, then yes... but just to run a command and you could move the @a[stuff] to the command, then do that

merry light
#

alright

#

tag @a[tag=!start] add start

#

is that correct?

alpine escarp
#

yes

#

simpler, right

merry light
#

much lol

#

execute @a[scores={thirst=-10000..1}] ~ ~ ~ scoreboard players set @p thirst 0

#

so for these,

#

actually, wait

#

per say i want the thirst to go up using a function, would this be the only line i need?

#

scoreboard players add @p thirst 500

alpine escarp
#

you forgot to move the selectors.... what your command would do with just @p is to give 500 thirst to the closest person the where the command is run...

#

pay attention to your @p .... it chooses the person or group of people... so be mindful else stuff is not going to work the way you intend

merry light
#

what about this code? execute @a[scores={thirst=-10000..1}] ~ ~ ~ scoreboard players set @p thirst 0