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

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


    You can always check out skUnity Downloads for downloads and any other information about Skript!

Not open for further replies.
No problem :emoji_slight_smile:
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:

                set {_king} to "NONE"
                set {_queen} to "NONE"
                set {_spawnloc} to "NONE"
                set {_inhabitants} to "0"
                set {_coins} to "0"
                broadcast "test"
                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:

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?
I think that's SELECT Netherlands FROM <table>
I think that's SELECT Netherlands FROM <table>
But does that work with the function:
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
I think that's SELECT Netherlands FROM <table>
I tried it but it didnt work, gave me an error.

WoWgetValue from Netherlands, "WoW_Countrystats" and "King"

this is the error:
Can't understand this condition/effect: WoWgetValue from Netherlands, "WoW_Countrystats" and "King" (, line 41: WoWgetValue from Netherlands, "WoW_Countrystats" and "King"')

so i have to figure out another way
You can't use that exact custom effect, you'll have to create a new one
You will need a new effect and a new syntax, maybe something like
get king from country %string% (,|and) table %string%
Not open for further replies.