#Cant understand block value

1 messages · Page 1 of 1 (latest)

rotund tinsel
#

hey, i have this code :

    {whitelist::blocks::*} = dirt, stone
on block place:
    if {whitelist::generator::*} contain event-block:
        set {xGen.%player%} to x coordinate of event-block
        set {yGen.%player%} to y coordinate of event-block
        set {zGen.%player%} to z coordinate of event-block
        add "%{xGen.%player%}%, %{yGen.%player%}%, %{zGen.%player%}%" to {generatorCoord::%player%::*}```
and i have an error in game that says: "Line 2: cant understand the value 'dirt, stone'"

so i tried to replace the = by a : that give me:
```variables:
    {whitelist::blocks::*}: dirt, stone```
but it return me "{whitelist::blocks::*}: dirt, stone is not an entry (like 'name = value')

Problem is, i just cant understand thoses errors
rotund tinsel
#

If anyone have an idea of why this error is here

mild plaza
#

ok

#

what is this abomination

#

add "%{xGen.%player%}%, %{yGen.%player%}%, %{zGen.%player%}%"
Just add the actual values, no need for the variables. (add "%x coordinate of event-block% ....." to ...)

#

the variables should also be local if youre gonna use them

zinc cloud
#

also for the actual problem you're having i'm pretty sure it is dirt block

mild plaza
#

you could also use event-(block's )location

#

also also, its always a good idea to use lists (::), and never ..

#

You should also use the uuid in case a plaer changes their name

rotund tinsel
rotund tinsel
rotund tinsel
mild plaza
#

ok

#

the location function is looking for 3 parameters (or more; world, yaw, pitch), but the coords are NUMBERS, not a string. And they are each one number not all in one.

mild plaza
rotund tinsel
#

it still return the error cant understand the value

rotund tinsel
#

i tried to parse the string object into numbers and it wasnt working

rotund tinsel
#

so what interest would i have to make a . variable into a :: list

mild plaza
mild plaza
rotund tinsel
mild plaza
#

why not?

#

theres a easier way to do this..

rotund tinsel
#

oh u mean a list with all players variable in it okay

mild plaza
#

if you use a string then just split it

#

but thats not the most efficient way

rotund tinsel
#

if i do event block location ill have the world: world thing with it

#

that i dont want

mild plaza
#

you're overthinking this

rotund tinsel
#

yeah maybe

#

to understand better, this is what i do with the coords, : every 5 seconds: loop all players: loop {generatorCoord::%loop-player%::*}: set {temp::%loop-player%::*} to "%loop-value-2%" split at ", " drop 1 brown dye named "&6Dirt powder" with lore "&7Worth &21$" at location(("%{temp::%loop-player%::1}%" parsed as a number), ("%{temp::%loop-player%::2}%" parsed as a number)+1, ("%{temp::%loop-player%::3}%" parsed as a number))

mild plaza
#

noooo

#

no periodical

#

use a while loop

#

and dont loop all players in a peridodiacl

rotund tinsel
#

like

#

how u want to do it tho, i need to spawn an item at all the coords in onlines players list

#

every five seconds

#

how tf do u do that with a while loop

mild plaza
#
  add (event-location | event-block's location) to {generators::%player's uuid%::*}
  send "You placed a diamond generator!" to player

  while {generators::%player's uuid%::*} contains (event-location | event-block's location):
    wait 10 minutes
    drop 1 of diamond at location 0.5 above (event-location | event-block's location)```
#

periodicals suck for gens and playtime rewards

rotund tinsel
#

(event-location | event-block's location) i never seen this kind of things before

#

what that

mild plaza
#

....

#

pick one

rotund tinsel
#

mmmh

#

k that actually genius

mild plaza
#

yeah

#

thats why periodicals suck

#

theres one timer for everything

rotund tinsel
#

yeah now i understand better

mild plaza
#

just remove it from the list on break

rotund tinsel
mild plaza
#

yes you can

rotund tinsel
#

okay nice

mild plaza
#

i assumed you already had that

#

i just provided an example of lists and a while loop

rotund tinsel
#

yeah yeah np ill do that by myself dont worry

#

i was just wondering if it was possible