why this not work

  • 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 community!

    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.

Uzumaki

Well-Known Member
Feb 20, 2017
310
10
18
Skript Version: 2.2-dev27
Skript Author: Bensku
Minecraft Version:
1.8.8
---
Full Code:

code_language.skript:
       set {_vpoints} to 50% of {sg.stats.points.%uuid of victim%}
        remove {_vpoints} from {sg.stats.points.%uuid of victim%}
        add {_vpoints} to {sg.stats.points.%uuid of attacker%}


Errors on Reload:

None

Console Errors: (if applicable)

None

Other Useful Info:
variables are the same

Addons using (including versions):
skellet, last
skquery,last
skrayfall,last
tuske,last

Troubleshooting:
none

Have you tried searching the docs? Yes
Have you tried searching the forums? Yes
What other methods have you tried to fix it? -_-
 
Skript Version: 2.2-dev27
Skript Author: Bensku
Minecraft Version:
1.8.8
---
Full Code:

code_language.skript:
       set {_vpoints} to 50% of {sg.stats.points.%uuid of victim%}
        remove {_vpoints} from {sg.stats.points.%uuid of victim%}
        add {_vpoints} to {sg.stats.points.%uuid of attacker%}


Errors on Reload:

None

Console Errors: (if applicable)

None

Other Useful Info:
variables are the same

Addons using (including versions):
skellet, last
skquery,last
skrayfall,last
tuske,last

Troubleshooting:
none

Have you tried searching the docs? Yes
Have you tried searching the forums? Yes
What other methods have you tried to fix it? -_-
Use division instead
 
50% was a example
:emoji_expressionless: you can divide no matter what the percentage is.

I personally think its easier to multiply rather than dividing but either works Ex) for 75% you can multiply by 3/4 or divide by 4/3
 
i need the percentage of a number.
ex, 156144 from a variable

code_language.skript:
on death of player:
    add 1 to {sg.stats.deaths.%uuid of victim%}        
    set {_vpoints} to 5% of {sg.stats.points.%uuid of victim%} #lets say is cuz is 156144
    remove {_vpoints} from {sg.stats.points.%uuid of victim%}
    add {_vpoints} to {sg.stats.points.%uuid of attacker%}

{sg.stats.points.%uuid of attacker%} so this at final is same as begin.
 
i need the percentage of a number.
ex, 156144

code_language.skript:
on death of player:
    add 1 to {sg.stats.deaths.%uuid of victim%}        
    set {_vpoints} to 5% of {sg.stats.points.%uuid of victim%}
    remove {_vpoints} from {sg.stats.points.%uuid of victim%}
    add {_vpoints} to {sg.stats.points.%uuid of attacker%}
So either multiply by 1/20 (which is 5/100 reduced) or in this case i guess itd be easier to divide by 20 but either way youll still end up with 5% of {sg.stats.points.%uuid of victim%}
 
i used all this time Skript v2.2-dev27 without any problems/errors on spigot 1.8.8
 
Status
Not open for further replies.