Not working with no errors

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

DoctorHyper

Member
Jul 22, 2017
19
0
1
23
Code:
on load:
    set {report.version} to "&7[v0.4]" #Report System Version
    
command /report [<offline player>] [<text>]:
    trigger:
        if arg-1 is set:
            if arg-2 is set:
                send "&a[Sent] &fModeration Team will review this report shortly. Thank you for the report!" to player
                set {reportsys.%arg-1's uuid%} to "&7[Pending] &fUser: &a%arg-1% &7/ &fReason: &a%arg-2% &7/ &7By: &a%player%"
                add arg-1 to {reportlists.%arg-1's uuid%::*}
                set {reportedusername.%arg-1's uuid%} to "%arg-1%"
                set {reportstatus.%arg-1's uuid%} to "True"
                add 1 to {reporttotal}
                add 1 to {reports.%arg-1's uuid%}
                set {reportreason.%arg-1's uuid%} to "%arg-2%"
                set {reportedby.%arg-1's uuid%} to "%player%"
                
                
            else:
                send "&eReport > &cUse: &7/report <player> <reason>"   
                
        else:
            send "&eReport > &cUse: &7/report <player> <reason>"


command /rr [<offline player>] [<text>]:
    trigger:
        if arg-1 is set:
            if {reportstatus.%player's uuid%} is "True":
                if arg-2 is "Accept":
                    send "&a[Accepted]"
            
                if arg-2 is "Deny":
                    send "&c[Denied] &fUser: %{reportedusername.%player's uuid%}%"
            
                else:
                    send "&eReport > &cUse: &7/rr <player> <accept/deny>"
                    
            else:
                send "&cThis player has not been reported."
            
            
        else:
            if {reportlists.%player%::*} is set:
                loop {reportlists.%player%::*}:
                    send "%{reportsys.%player's uuid%}%" to player
            else:
                send "&eReport > &cThere is no reports."


command /admin:rr [<offline player>]:
    permission: admin.rr
    permission message: &eReport > &cYou have to be ADMIN or higher to use this command!
    trigger:
        remove arg-1 from {reportlist.%arg-1's uuid%::*}
        set {reportstatus.%arg-1's uuid%} to "False"
        set {reportsys.%arg-1's uuid%} to nothing

I want to make a report system when you do /report <player> <reason> it sends the alert to the other command called /rr And when you do /rr (alone with no args) it should show the list of [Pending] Users.. but it glitches and says <none> or.. doubles the message or just messes it up..

This should happen when you do /rr alone and so that it goes in rows. Like this: (MC Chat)
[Pending] User: Player1 / Reason: Hacking / By: TC6
[Pending] User: Player2 / Reason: Test / By: TC6
 
Problem is you're setting {reportlists.%arg-1's uuid%::*} but checking {reportlists.%player%::*}, since you're saving it with the player's uuid you need to specify with "player's uuid" instead of "player". Fix that on line 44 and 45.

Also on line 55 in the admin command it is missing an "s" at the end of the reportlists variable
 
Problem is you're setting {reportlists.%arg-1's uuid%::*} but checking {reportlists.%player%::*}, since you're saving it with the player's uuid you need to specify with "player's uuid" instead of "player". Fix that on line 44 and 45.

Also on line 55 in the admin command it is missing an "s" at the end of the reportlists variable
upload_2020-9-12_23-1-1.png


Do you know how to clear this? because I have no clue how to clear this.
 
Status
Not open for further replies.