3 Errors with texban :(

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

xXSwainXx

Active Member
Jan 27, 2017
55
5
8
Hey i have 3 errors:
Screenshot_41.png


code_language.skript:
function BanPlayer(p_name:text, p_time:text, p_reason:text, from:text):
    set {_SetResult::*} to objects in column "Player" from result of query "SELECT * FROM Ban WHERE Player = '%{_p_name}%'" and close
    set {_getResult} to false
    loop {_SetResult::*}:
        If loop-value is {_p_name}:
            set {_getResult} to true
    If {_getResult} is false:
        update "INSERT INTO `Ban` (`Player`,`Time`,`Executed`,`Reason`,`FromPlayer`) VALUES ('%{_p_name}%', '%{_p_time}%', '%unix time%', '%{_p_reason}%', '%{_from}%')"            # Here is the error...

code_language.skript:
function MutePlayer(p_name:text, p_time:text, p_reason:text, from:text):
    set {_SetResult::*} to objects in column "Player" from result of query "SELECT * FROM Mute WHERE Player = '%{_p_name}%'" and close
    set {_getResult} to false
    loop {_SetResult::*}:
        If loop-value is {_p_name}:
            set {_getResult} to true
    If {_getResult} is false:
        update "INSERT INTO `Mute` (`Player`,`Time`,`Executed`,`Reason`,`FromPlayer`) VALUES ('%{_p_name}%', '%{_p_time}%', '%unix time%', '%{_p_reason}%', '%{_from}%')"        # Here is the error...

code_language.skript:
function UNIX_Algorithm(executed:text, time:text, parameter:text) :: text:
   set {_executed} to {_executed} parsed as number
   If {_parameter} contains "second":
       set {_time} to {_time} parsed as number
   else:
       If {_parameter} contains "minute":
           set {_time} to {_time} parsed as number
           set {_time} to ({_time}*60)
       else:
           If {_parameter} contains "hour":
               set {_time} to {_time} parsed as number
               set {_time} to ((({_time}*60)*60))
           else:
               If {_parameter} contains "day":
                   set {_time} to {_time} parsed as number
                   set {_time} to (((({_time}*24)*60)*60))
   set {_Calculate.UNIX} to ({_executed}+{_time})
   set {_Calculate.Now.UNIX} to unix time             # Here is the error...
   set {_Calculate.Result} to ({_Calculate.UNIX}-{_Calculate.Now.UNIX})
   set {_UNIX.DAYS} to 0
   set {_UNIX.HOURS} to 0
   set {_UNIX.MINUTES} to 0
   set {_UNIX.SECONDS} to 0
   while {_Calculate.Result} is bigger or equal to 86400:
       set {_UNIX.DAYS} to ({_UNIX.DAYS}+1)
       set {_Calculate.Result} to ({_Calculate.Result}-86400)
   If {_Calculate.Result} is smaller than 86400:
       while {_Calculate.Result} is bigger or equal to 3600:
           set {_UNIX.HOURS} to ({_UNIX.HOURS}+1)
           set {_Calculate.Result} to ({_Calculate.Result}-3600)
       If {_Calculate.Result} is smaller than 3600:
           while {_Calculate.Result} is bigger or equal to 60:
               set {_UNIX.MINUTES} to ({_UNIX.MINUTES}+1)
               set {_Calculate.Result} to ({_Calculate.Result}-60)
           If {_Calculate.Result} is smaller than 60:
               set {_UNIX.SECONDS} to {_Calculate.Result}
   If "%{_UNIX.DAYS}%", "%{_UNIX.HOURS}%", "%{_UNIX.MINUTES}%" or "%{_UNIX.SECONDS}%" contains "-":
       return "false"
   else:
       return "%{_UNIX.DAYS}%'d %{_UNIX.HOURS}%'h %{_UNIX.MINUTES}%'m %{_UNIX.SECONDS}%'s"



PLS HELP
 
Last edited:
Status
Not open for further replies.