I just tried that but now it says:try
type: type1 instead of using the = sign
code_language.skript:
'type: type1' is not an entry (like 'name : value')
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 community!
Now, what are you waiting for? Join the community now!
You can always check out skUnity Downloads for downloads and any other information about Skript!
I just tried that but now it says:try
type: type1 instead of using the = sign
'type: type1' is not an entry (like 'name : value')
on load:
set {type} to "type1"
variables:
type = "type1"
variables:
type = "type1"
I just tried that and it seems to be working for now, thanks for the help.hm... im stumped i have never set variables that way.
I have just always dont thinks like
[doublepost=1524423947,1524423902][/doublepost]scratch that, i just figured it outcode_language.skript:on load: set {type} to "type1"
try
code_language.skript:variables: type = "type1"
Oh okay, thanks.The first example was good except one thing. As it is a variable, you'll have to surround the text with quotes. Like this:
code_language.skript:variables: type = "type1"
Edit: sniped
I just tried this but using the command doesn't seem to change the variable in the file. :/ It even acted as if the variable was not set at first, did i do something wrong?I just tried that and it seems to be working for now, thanks for the help.
[doublepost=1524424360][/doublepost]
Oh okay, thanks.![]()
Could you give an example of the code you are using to change said variable?
Variables:
type = "type1"
Command /setskripttype [<text>] [<text>]:
Permission: {@setskripttype-use-perm}
Permission message: {@setskripttype-no-use-perm}
Trigger:
if command sender is player:
if arg-1 is set:
if arg-1 is "type":
if arg-2 is set:
if arg-2 is "type1":
if {type} is "type1":
message "{@type-already-type1}"
else:
set {type} to "type1"
message "{@you-set-type-type1}"
else if arg-2 is "type2":
if {type} is "type2":
message "{@type-already-type2}"
else:
set {type} to "type2"
message "{@you-set-type-type2}"
else:
message "{@invalid-type-value}"
else:
message "{@setskripttype-value-not-set}"
else:
message "{@invalid-setting}"
else:
message "{@setskripttype-setting-not-set}"
else if command sender is console:
#I'll spare you for almost the same code(just some extra messages and stuff)
On load:
if {type} is not set:
set {type} to "type1"
Variables:
type = "type1"
Variables:
type = "type1"
Variables:
type = "type2"
I see, does that mean i can just remove the "Variables = "type1"" part? The on load should still set it to type1 if it is not set so it should work, right?It won't actually change what is written in your skript itself, it will just change the variable that is saved in the CSV file
I see, thank you for all the help.(everyone of you who commented)Correct. That’s what I generally do