1. 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!

  2. LOOKING FOR A VERSION OF SKRIPT??:

    You can always check our our Wiki for downloads and any other information about Skript!

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Solved "Func" Function doesn't work in java 1.12.2

Discussion in 'Skript' started by iStopcontact, Apr 15, 2019.

Thread Status:
Not open for further replies.
  1. iStopcontact

    iStopcontact Member

    Joined:
    Feb 18, 2017
    Messages:
    111
    Likes Received:
    1
    I have 1 quick question, is it also possible to acces a database table without use the name of a player?

    Because i also have a databse table for the game i am making wich saves information about things but not about like the player

    This is the skript about creating it so you know whats about:

    Code (Text):
    1.                 set {_king} to "NONE"
    2.                 set {_queen} to "NONE"
    3.                 set {_spawnloc} to "NONE"
    4.                 set {_inhabitants} to "0"
    5.                 set {_coins} to "0"
    6.                 broadcast "test"
    7.                 execute "INSERT INTO WoW_Countrystats (`Name`, `King`, `Queen`, `Spawnloc`, `Inhabintants`, `Coins`) VALUES (%arg-2%, %{_king}%, %{_queen}%, %{_spawnloc}%, %{_inhabitants}%, %{_coins}%)" in {WoWDB}
    and it creates this:
    http://prntscr.com/nfvul4

    So now for example i want to get the king from the country "Netherlands"

    How can i get the value of the King from the row Netherlands?
     
  2. T

    TPGamesNL Well-Known Member

    Joined:
    Jan 20, 2018
    Messages:
    1,287
    Likes Received:
    73
    Medals:
    I think that's SELECT Netherlands FROM <table>
     
  3. iStopcontact

    iStopcontact Member

    Joined:
    Feb 18, 2017
    Messages:
    111
    Likes Received:
    1
    But does that work with the function:
    Code (Text):
    1. effect WoWgetValue from [[offline] player] %offline player%, [table] %string% (and|,) [column] %string%:
    Because the first think is [[offline] player] %offline player% and a country isn't a offline player
    --- Double Post Merged, Apr 23, 2019, Original Post Date: Apr 23, 2019 ---
    I tried it but it didnt work, gave me an error.

    Code (Text):
    1. WoWgetValue from Netherlands, "WoW_Countrystats" and "King"
    this is the error:
    Code (Text):
    1. Can't understand this condition/effect: WoWgetValue from Netherlands, "WoW_Countrystats" and "King" (WoW.sk, line 41: WoWgetValue from Netherlands, "WoW_Countrystats" and "King"')
    so i have to figure out another way
     
  4. T

    TPGamesNL Well-Known Member

    Joined:
    Jan 20, 2018
    Messages:
    1,287
    Likes Received:
    73
    Medals:
    You can't use that exact custom effect, you'll have to create a new one
     
  5. iStopcontact

    iStopcontact Member

    Joined:
    Feb 18, 2017
    Messages:
    111
    Likes Received:
    1
    but what should i replace with "[offline] player] %offline player%"
     
  6. T

    TPGamesNL Well-Known Member

    Joined:
    Jan 20, 2018
    Messages:
    1,287
    Likes Received:
    73
    Medals:
    You will need a new effect and a new syntax, maybe something like
    Code (Text):
    1. get king from country %string% (,|and) table %string%
     
  7. iStopcontact

    iStopcontact Member

    Joined:
    Feb 18, 2017
    Messages:
    111
    Likes Received:
    1
    allright thanks, will work with that
     
Thread Status:
Not open for further replies.
Loading...