help me please, error in console

  • 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.
Do you have WorldGuard installed?

Yes, has worldguard
[doublepost=1527832778,1527831838][/doublepost]
Show Code?

code_language.skript:
script options:
    $ db url jdbc:mysql://localhost:3306/????????
    $ db username ????
    $ db password ????
    
options:
    f_level: 1
    f_minEXP: 0
    f_maxEXP: 100
    f_str: 1
    f_agi: 1
    f_dex: 1
    f_point: 1
    
function getStatus(p:player):
    set {_Level::*} to objects in column "level" from result of query "SELECT * FROM `mc_user_status` WHERE `username` = '%{_p}%'"
    set {_minEXP::*} to objects in column "minEXP" from result of query "SELECT * FROM `mc_user_status` WHERE `username` = '%{_p}%'"
    set {_maxEXP::*} to objects in column "maxEXP" from result of query "SELECT * FROM `mc_user_status` WHERE `username` = '%{_p}%'"
    set {_STR::*} to objects in column "str" from result of query "SELECT * FROM `mc_user_status` WHERE `username` = '%{_p}%'"
    set {_AGI::*} to objects in column "agi" from result of query "SELECT * FROM `mc_user_status` WHERE `username` = '%{_p}%'"
    set {_DEX::*} to objects in column "dex" from result of query "SELECT * FROM `mc_user_status` WHERE `username` = '%{_p}%'"
    set {_point::*} to objects in column "point" from result of query "SELECT * FROM `mc_user_status` WHERE `username` = '%{_p}%'"

    send " Level: %{_Level::*}% ( EXP: %{_minEXP::*}%/%{_maxEXP::*}% )" to {_p}
    send " STR: %{_STR::*}%" to {_p}
    send " AGI: %{_AGI::*}%" to {_p}
    send " DEX: %{_DEX::*}%" to {_p}
    send " Status Point: %{_point::*}%" to {_p}
        
function LevelUP(p:player):
    set {_Level::*} to objects in column "level" from result of query "SELECT * FROM `mc_user_status` WHERE `username` = '%{_p}%'"
    set {_minEXP::*} to objects in column "minEXP" from result of query "SELECT * FROM `mc_user_status` WHERE `username` = '%{_p}%'"
    set {_maxEXP::*} to objects in column "maxEXP" from result of query "SELECT * FROM `mc_user_status` WHERE `username` = '%{_p}%'"
    set {_min} to "%{_minEXP::*}%" parsed as integer
    set {_max} to "%{_maxEXP::*}%" parsed as integer
    
    if {_Level::*} <= 10:
        set {_nextEXP} to 1000
    else if {_Level::*} <= 50:
        set {_nextEXP} to 5000
    else if {_Level::*} <= 99:
        set {_nextEXP} to 10000
        
    if {_min} >= {_max}:
        update "UPDATE `mc_user_status` SET `level`= `level`+1,`maxEXP`=`maxEXP`+'%{_nextEXP}%',`point`=`point`+1 WHERE `username` = '%{_p}%'"
        send {_p} title "Level UP!"
    
function setEXP(p:player):
    update "UPDATE `mc_user_status` SET `minEXP`=`minEXP`+10 WHERE `username` = '%{_p}%'"
    LevelUP({_p})
    
on join:
    set {_Username::*} to objects in column "username" from result of query "SELECT * FROM `mc_user_status` WHERE `username` = '%player%'"
    if {_Username::*} is not set:
        send "%{_Username::*}%"
        update "INSERT INTO `mc_user_status` (`username`, `level`, `minEXP`, `maxEXP`, `str`, `agi`, `dex`, `point`) VALUES ('%player%','{@f_level}','{@f_minEXP}','{@f_maxEXP}','{@f_str}','{@f_agi}','{@f_dex}','{@f_point}')"
command /level:
    trigger:
        getStatus(player)

on death:
    setEXP(attacker)
 
Yes, has worldguard
[doublepost=1527832778,1527831838][/doublepost]

code_language.skript:
script options:
    $ db url jdbc:mysql://localhost:3306/????????
    $ db username ????
    $ db password ????
  
options:
    f_level: 1
    f_minEXP: 0
    f_maxEXP: 100
    f_str: 1
    f_agi: 1
    f_dex: 1
    f_point: 1
  
function getStatus(p:player):
    set {_Level::*} to objects in column "level" from result of query "SELECT * FROM `mc_user_status` WHERE `username` = '%{_p}%'"
    set {_minEXP::*} to objects in column "minEXP" from result of query "SELECT * FROM `mc_user_status` WHERE `username` = '%{_p}%'"
    set {_maxEXP::*} to objects in column "maxEXP" from result of query "SELECT * FROM `mc_user_status` WHERE `username` = '%{_p}%'"
    set {_STR::*} to objects in column "str" from result of query "SELECT * FROM `mc_user_status` WHERE `username` = '%{_p}%'"
    set {_AGI::*} to objects in column "agi" from result of query "SELECT * FROM `mc_user_status` WHERE `username` = '%{_p}%'"
    set {_DEX::*} to objects in column "dex" from result of query "SELECT * FROM `mc_user_status` WHERE `username` = '%{_p}%'"
    set {_point::*} to objects in column "point" from result of query "SELECT * FROM `mc_user_status` WHERE `username` = '%{_p}%'"

    send " Level: %{_Level::*}% ( EXP: %{_minEXP::*}%/%{_maxEXP::*}% )" to {_p}
    send " STR: %{_STR::*}%" to {_p}
    send " AGI: %{_AGI::*}%" to {_p}
    send " DEX: %{_DEX::*}%" to {_p}
    send " Status Point: %{_point::*}%" to {_p}
      
function LevelUP(p:player):
    set {_Level::*} to objects in column "level" from result of query "SELECT * FROM `mc_user_status` WHERE `username` = '%{_p}%'"
    set {_minEXP::*} to objects in column "minEXP" from result of query "SELECT * FROM `mc_user_status` WHERE `username` = '%{_p}%'"
    set {_maxEXP::*} to objects in column "maxEXP" from result of query "SELECT * FROM `mc_user_status` WHERE `username` = '%{_p}%'"
    set {_min} to "%{_minEXP::*}%" parsed as integer
    set {_max} to "%{_maxEXP::*}%" parsed as integer
  
    if {_Level::*} <= 10:
        set {_nextEXP} to 1000
    else if {_Level::*} <= 50:
        set {_nextEXP} to 5000
    else if {_Level::*} <= 99:
        set {_nextEXP} to 10000
      
    if {_min} >= {_max}:
        update "UPDATE `mc_user_status` SET `level`= `level`+1,`maxEXP`=`maxEXP`+'%{_nextEXP}%',`point`=`point`+1 WHERE `username` = '%{_p}%'"
        send {_p} title "Level UP!"
  
function setEXP(p:player):
    update "UPDATE `mc_user_status` SET `minEXP`=`minEXP`+10 WHERE `username` = '%{_p}%'"
    LevelUP({_p})
  
on join:
    set {_Username::*} to objects in column "username" from result of query "SELECT * FROM `mc_user_status` WHERE `username` = '%player%'"
    if {_Username::*} is not set:
        send "%{_Username::*}%"
        update "INSERT INTO `mc_user_status` (`username`, `level`, `minEXP`, `maxEXP`, `str`, `agi`, `dex`, `point`) VALUES ('%player%','{@f_level}','{@f_minEXP}','{@f_maxEXP}','{@f_str}','{@f_agi}','{@f_dex}','{@f_point}')"
command /level:
    trigger:
        getStatus(player)

on death:
    setEXP(attacker)
try deleteing RandomSK I sometimes had problems with it while using other addons
 
Status
Not open for further replies.