Fix error

  • 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.

varboosted

Active Member
Apr 20, 2020
50
3
8
24
# SOUPS
on walk on Yellow Hardened Clay:
if event-block's location is location(-106, 66, 150, world "world"):
set {_waited} to difference between {soup.%player%.lastused} and now
if {_waited} is less than a minute:
message "&cYou have to wait %difference between a minute and {_waited}% before you can gain soups again."
play raw sound "RECORD_CAT" at player with pitch 1 volume 100
stop

player doesn't have space for a soup:
message "&cYou do not have enough space in your inventory to hold the soups!"
stop

give player 5 of soup to player
play raw sound "RECORD_CAT" at player with pitch 1 volume 100
send "&aYou got 5 soups!" to player
stop

set {soup.%player%.lastused} to now


# TELEPORTATIONS
on walk on Red Hardened Clay:
if event-block's location is location(-106, 66, 149 world "world"):
set {_waited} to difference between {teleport.%player%.lastused} and now
if {_waited} is less than a minute:
message "&cYou have to wait %difference between a minute and {_waited}% before you can gain soups again."
play raw sound "RECORD_CAT" at player with pitch 1 volume 100
stop

teleport the player to location(15, 4, 50, world "the world")
play raw sound "PORTAL_TRIGGER" at player with pitch 1 volume 100
send "&aYou have been teleported" to player
stop

set {teleport.%player%.lastused} to now


unknown.png
 
Please put your code in code blocks or it's VERY hard to understand. You can do this using CODE and /CODE with square brackets surrounding them. Also this would be very easy to fix if you looked in the documentation, so please read those before making a post.

Line 14 you are saying that you want to give "player 5 of soup" to the player. Replace that with
Code:
give 5 soup to player

Line 24 you are writing that like a function, the proper syntax is
Code:
teleport player to location at 15, 4, 50 in world "the world"
 
Status
Not open for further replies.