code_language.skript:
spawn a sheep at {pets::location%{_p}%}#I can do this
#but I cant do this one why how I do this
set {_pet} to "sheep" #in my code is a string
spawn a {_pet} at {pets::location%{_p}%}#this one not working
#also this not working
spawn {_s} at {pets::location%{_p}%}
#this is the code
function pets(p: player, s: string):#string are like sheep creeper
spawn a {_s} at {pets::location%{_p}%}#console error
#Can't understand this condition/effect: spawn a {_pet} at {pets::location%{_p}%} (pets.sk, line 6: spawn a {_pet} at {pets::location%{_p}%}')
#Can't understand this condition/effect: spawn a {_s} at {pets::location%{_p}%} (pets.sk, line 5: spawn a {_s} at {pets::location%{_p}%}')