Solved Variables can't hold strings?

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

PantherBoy

Active Member
Jul 20, 2017
74
0
6
24
I have this code:
code_language.skript:
on damage:
    if attacker's tool is a blaze rod named "&5Varázspálca":
        if {B.%attacker%} = tuz:
            if {J.%attacker%} = ures:
                ignite victim for 5 seconds
            if {J.%attacker%} = tuz:
                ignite victim for 5 seconds
            if {J.%attacker%} = levego:
                message "A levegő kioltja a tüzet" to attacker
        if {B.%attacker%} = viz:
            if {J.%attacker%} = ures:
                message "&9Fulladsz" to victim
                apply poison to victim for 5 seconds
                set {_loc.%victim%} to the location 1 meter above the victim
                drawDot count 10, particle "watersplash", XYZ .2, .2, .2, center {_loc.victim}, visibleRange 320, pulseDelay 0, keepFor 20 ticks
                set victim's walk speed to 0
                wait 5 seconds
                set victim's walk speed to 0.2
            if {J.%attacker%} = viz:
                message "&9Fulladsz" to victim
                apply poison to victim for 5 seconds
                set {_loc.%victim%} to the location 1 meter above the victim
                drawDot count 10, particle "watersplash", XYZ .2, .2, .2, center {_loc.victim}, visibleRange 320, pulseDelay 0, keepFor 20 ticks
                set victim's walk speed to 0
                wait 5 seconds
                set victim's walk speed to 0.2
        if {B.%attacker%} = fold:
            if {J.%attacker%} = ures:
                apply blindness to victim for 5 seconds
                apply poison to victim for 5 seconds
                set victim's helmet to grass
                wait 5 seconds
                set victim's helmet to levego
            if {J.%attacker%} = fold:
                apply blindness to victim for 5 seconds
                apply poison to victim for 5 seconds
                set victim's helmet to grass
                wait 5 seconds
                set victim's helmet to levego
        if {B.%attacker%} = levego:
            if {J.%attacker%} = ures:
                push victim backwards at speed 5
            if {J.%attacker%} = levego:
                push victim backwards at speed 5
        if {J.%attacker%} = tuz:
            if {B.%attacker%} = ures:
                ignite victim for 5 seconds
            if {B.%attacker%} = tuz:
                ignite victim for 5 seconds
        if {J.%attacker%} = viz:
            if {B.%attacker%} = ures:
                message "&9Fulladsz" to victim
                apply poison to victim for 5 seconds
                set {_loc.%victim%} to the location 1 meter above the victim
                drawDot count 10, particle "vizsplash", XYZ .2, .2, .2, center {_loc.victim}, visibleRange 320, pulseDelay 0, keepFor 20 ticks
                set victim's walk speed to 0
                wait 5 seconds
                set victim's walk speed to 0.2
            if {B.%attacker%} = viz:
                message "&9Fulladsz" to victim
                apply poison to victim for 5 seconds
                set {_loc.%victim%} to the location 1 meter above the victim
                drawDot count 10, particle "vizsplash", XYZ .2, .2, .2, center {_loc.victim}, visibleRange 320, pulseDelay 0, keepFor 20 ticks
                set victim's walk speed to 0
                wait 5 seconds
                set victim's walk speed to 0.2
        if {J.%attacker%} = fold:
            if {B.%attacker%} = ures:
                apply blindness to victim for 5 seconds
                apply poison to victim for 5 seconds
                set victim's helmet to grass
                wait 5 seconds
                set victim's helmet to levego
            if {B.%attacker%} = fold:
                apply blindness to victim for 5 seconds
                apply poison to victim for 5 seconds
                set victim's helmet to grass
                wait 5 seconds
                set victim's helmet to levego
        if {J.%attacker%} = levego:
            if {B.%attacker%} = ures:
                push victim backwards at speed 5
            if {B.%attacker%} = levego:
                push victim backwards at speed 5
    else:
        cancel event
code_language.skript:
And I have a lot of error:

[22:16:29 ERROR]: 'tuz' is not an entity type (Wizardsk2.0.sk, line 51: if {B.%attacker%} = tuz:')
[22:16:29 ERROR]: 'viz' is not an entity type (Wizardsk2.0.sk, line 58: if {B.%attacker%} = viz:')
[22:16:29 ERROR]: 'fold' is not an entity type (Wizardsk2.0.sk, line 75: if {B.%attacker%} = fold:')
[22:16:29 ERROR]: 'levego' is not an entity type (Wizardsk2.0.sk, line 88: if {B.%attacker%} = levego:')
[22:16:29 ERROR]: 'tuz' is not an entity type (Wizardsk2.0.sk, line 93: if {J.%attacker%} = tuz:')
[22:16:29 ERROR]: 'viz' is not an entity type (Wizardsk2.0.sk, line 98: if {J.%attacker%} = viz:')
[22:16:29 ERROR]: 'fold' is not an entity type (Wizardsk2.0.sk, line 115: if {J.%attacker%} = fold:')
[22:16:29 ERROR]: 'levego' is not an entity type (Wizardsk2.0.sk, line 128: if {J.%attacker%} = levego:')
[22:16:29 ERROR]: 'tuz' is not an entity type (Wizardsk2.0.sk, line 152: set {J.%player%} to tuz')
[22:16:29 ERROR]: 'viz' is not an entity type (Wizardsk2.0.sk, line 155: set {J.%player%} to viz')
[22:16:29 ERROR]: 'fold' is not an entity type (Wizardsk2.0.sk, line 158: set {J.%player%} to fold')
[22:16:29 ERROR]: 'levego' is not an entity type (Wizardsk2.0.sk, line 161: set {J.%player%} to levego')
[22:16:29 ERROR]: 'ures' is not an entity type (Wizardsk2.0.sk, line 164: set {J.%player%} to ures')
[22:16:30 ERROR]: 'tuz' is not an entity type (Wizardsk2.0.sk, line 167: set {B.%player%} to tuz')
[22:16:30 ERROR]: 'viz' is not an entity type (Wizardsk2.0.sk, line 170: set {B.%player%} to viz')
[22:16:30 ERROR]: 'fold' is not an entity type (Wizardsk2.0.sk, line 173: set {B.%player%} to fold')
[22:16:30 ERROR]: 'levego' is not an entity type (Wizardsk2.0.sk, line 176: set {B.%player%} to levego')
[22:16:30 ERROR]: 'ures' is not an entity type (Wizardsk2.0.sk, line 179: set {B.%player%} to ures')
What is the problem? :emoji_frowning:
I'm so sad now :emoji_frowning:
 
They definitely can, try putting tuz in quotes
if {variable} = "text string":
also it makes it a bit easier to read your code and help if you put either in pastebin and post the link or use the insert code option before you post:3
 
They definitely can, try putting tuz in quotes
if {variable} = "text string":
also it makes it a bit easier to read your code and help if you put either in pastebin and post the link or use the insert code option before you post:3
oh, thx. I am tired again :emoji_grinning:
 
Status
Not open for further replies.