on block place:
set {_timePlayed} to getPlayTime()
if {_timePlayed} < 10:
set {_spawn} to location of world's spawn
if distance between event-location and {_spawn} < 256:
cancel event
send "&cYou cannot destroy blocks within the spawn protection radius for up to 10 hours of game time!" to the player
on block break:
set {_timePlayed} to getPlayTime()
if {_timePlayed} < 10:
set {_spawn} to location of world's spawn
if distance between event-location and {_spawn} < 256:
cancel event
send "&cYou cannot destroy blocks within the spawn protection radius for up to 10 hours of game time!" to the player
ERROR in game:
How should I replace my code on lines 4 and 14? set {_timePlayed} to getPlayTime()
my code in Skript
on block place: set {_timePlayed} to getPlayTime() if {_timePlayed} < 10: set {_spawn} to location of world's spawn if distance between event-location and {_spawn} < 256: cancel event send "&cYou cannot destroy blocks within the spawn protection radius for up to 10 hours of game time!" to the player
on block break: set {_timePlayed} to getPlayTime() if {_timePlayed} < 10: set {_spawn} to location of world's spawn if distance between event-location and {_spawn} < 256: cancel event send "&cYou cannot destroy blocks within the spawn protection radius for up to 10 hours of game time!" to the player
ERROR in game:
How should I replace my code on lines 4 and 14? set {_timePlayed} to getPlayTime()