So I am making a custom wood type changer which if you pick up (or have in your inventory) a type of log/planks/sapling it will convert it into the wood type of choice.
Here's my code:
So what it does is that it creates multiple commands that choose the wood type which those commands will be activated from a gui. What the bottom part does is when you pick up an amount of oak log, it saves that amount to a local variable, deletes all of those logs and give a specified amount of wood in that variable.
But the console threw this error:
Any ways to fix this? Help would be appreciated!
Here's my code:
Code:
#1:oak, 2:spruce, 3:birch, 4:jungle, 5:acacia, 6:dark oak
command /woodtypeoak:
trigger:
set {woodtype.%player%} to "1"
command /woodtypespruce:
trigger:
set {woodtype.%player%} to "2"
command /woodtypebirch:
trigger:
set {woodtype.%player%} to "3"
command /woodtypejungle:
trigger:
set {woodtype.%player%} to "4"
command /woodtypeacacia:
trigger:
set {woodtype.%player%} to "5"
command /woodtypedarkoak:
trigger:
set {woodtype.%player%} to "6"
on pickup of oak log:
if {woodtype.%player%} is not 1:
set {_woodamount.%player%} to item amount of event-item
remove all oak logs from the player
if {woodtype.%player%} is 2:
give {_woodamount.%player%} spruce logs to the player
So what it does is that it creates multiple commands that choose the wood type which those commands will be activated from a gui. What the bottom part does is when you pick up an amount of oak log, it saves that amount to a local variable, deletes all of those logs and give a specified amount of wood in that variable.
But the console threw this error:
Code:
[16:10:58 ERROR]: Line 25: (woodtype.sk)
Can't understand this condition/effect: give {_woodamount.%player%} spruce logs to the player
Line: give {_woodamount.%player%} spruce logs to the player
[16:10:58 INFO]: Loaded 4 scripts with a total of 7 triggers and 7 commands in 0.09 seconds
[16:10:58 INFO]: [Skript] Encountered 1 error while reloading all scripts! (95ms)