Solved Need help with how to keep track of how many blocks a player has picked up since they joined.

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

JadeInnit1

Member
Oct 3, 2022
14
0
1
Ok so here is a bit of context. I am trying to make a skript that will teleport you to a certain set of coordinates once you've mined X amount of dirt or stone or whatever it is in the future. At this point in time, I need it to be for dirt.

2.6.3
Skript author: Me, Quiettee
1.19.2
Code:
variables:
    {dirtcount} = 0

on pickup of dirt:
    add 1 to {DirtCount}
    
if {dirtcount} = 5
    teleport %uuid of player% to 280981 164 48866

The errors I am getting on reload are
1. Line 8, Indentation error: Expected 0 tabs but found 1 tab.
2: Line 7: Invalid line - all code has to be put into triggers

All help is appreciated!
 
Ok so here is a bit of context. I am trying to make a skript that will teleport you to a certain set of coordinates once you've mined X amount of dirt or stone or whatever it is in the future. At this point in time, I need it to be for dirt.

2.6.3
Skript author: Me, Quiettee
1.19.2
Code:
variables:
    {dirtcount} = 0

on pickup of dirt:
    add 1 to {DirtCount}
   
if {dirtcount} = 5
    teleport %uuid of player% to 280981 164 48866

The errors I am getting on reload are
1. Line 8, Indentation error: Expected 0 tabs but found 1 tab.
2: Line 7: Invalid line - all code has to be put into triggers

All help is appreciated!
For the first: your's code need to be put into spefic trigger, like as event, for that you have errors on line 7-8
Lets next, if you wanna assign some variable with player - use 'uuid of player' inside variable name.
Teleport effect's inputs is Entity and Location, you are using uuid instead of entity and something unspeficed as Location.
Please, read some scripting guides on forum

Fixed code:
Code:
on pickup of dirt:
    add 1 to {-p::%uuid of player%::dirtCount}
  
    if {-p::%uuid of player%::dirtCount} is 5:
         teleport player to location 280981, 164, 48866
 
For the first: your's code need to be put into spefic trigger, like as event, for that you have errors on line 7-8
Lets next, if you wanna assign some variable with player - use 'uuid of player' inside variable name.
Teleport effect's inputs is Entity and Location, you are using uuid instead of entity and something unspeficed as Location.
Please, read some scripting guides on forum

Fixed code:
Code:
on pickup of dirt:
    add 1 to {-p::%uuid of player%::dirtCount}
 
    if {-p::%uuid of player%::dirtCount} is 5:
         teleport player to location 280981, 164, 48866
Thanks Iotzy, You came in clutch again!
 
Status
Not open for further replies.