Hello Skripters! I'm looking for some help to an issue I'm having regarding an error I've been getting.
The error I receive on reload of the script is "Cannot Use Variables Here", and I'm not sure how to fix it.
[doublepost=1600572275,1600570615][/doublepost]Nvm, I found that if I:
The error I receive on reload of the script is "Cannot Use Variables Here", and I'm not sure how to fix it.
Code:
on right click:
set {_e} to clicked block's location
if {genpos::{@whichidslot}::%player%::*} contains {_e}:
if player is sneaking:
if {b.%player%} is greater than or equal to {@upgradecost}:
if {@whichidslot} is not {@upgradeid}:
send "Purchased upgrade for {@upgradecost}"
here --> set block at {_e} in {@world} to {@upgradeblock} #HERE IS THE ISSUE
make console execute command "eco take %player% {@upgradecost}"
remove {_e} from {genpos::{@whichidslot}::%player%::*}
add {_e} to {genpos::{@upgradeid}::%player%::*}
else:
send "&cThis gen is already at the max level!"
else:
send "&cUpgrade costs ${@upgradecost}"
Code:
on right click:
set {_e} to clicked block #I ALSO CHANGED THIS
if {genpos::{@whichidslot}::%player%::*} contains {_e}:
if player is sneaking:
if {b.%player%} is greater than or equal to {@upgradecost}:
if {@whichidslot} is not {@upgradeid}:
send "Purchased upgrade for {@upgradecost}"
make console execute command "eco take %player% {@upgradecost}"
remove {_e} from {genpos::{@whichidslot}::%player%::*}
add {_e} to {genpos::{@upgradeid}::%player%::*}
set block at {_e} to {@upgradeblock} #HERE IS THE FIX
else:
send "&cThis gen is already at the max level!"
stop
else:
send "&cUpgrade costs ${@upgradecost}"
stop