Error on startup but why?

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

    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.

pepper82

Member
Jan 26, 2017
272
1
18
Hi all,

I get this error on server start:
code_language.skript:
17:41:52
 CONSOLE:
ERROR]: [Skript] The function 'ShowToplist' has only 1 argument, but 2 are given. If you want to use lists in function calls, you have to use additional parentheses, e.g. 'give(player, (iron ore and gold ore))' (events.sk, line 5410: ShowToplist({_id},{_p})')

The code:
code_language.skript:
function ShowToplist(id: string, p: player):
    if {event::name::%{_id}%::gamemode} is "time":
        message "test"
(I also tried replacing STRING with TEXT, but makes no difference)

And I call it this way:
code_language.skript:
set {_p} to the player
set {_id} to "test"
ShowToplist({_id},{_p})

The strange thing is, that when I remove ALL other scripts from the scripts-folder and ONLY keep this script, then NO error occurs on startup ... Any ideas?
The function will not work.

Also, the error does not show up when reloading the script on the server. After reloading the script the function works.


Using latest bensku's release 1.12.2.
PaperSpigot 1.12.2
 
Last edited:
Hi all,

I get this error on server start:
code_language.skript:
17:41:52
 CONSOLE:
ERROR]: [Skript] The function 'ShowToplist' has only 1 argument, but 2 are given. If you want to use lists in function calls, you have to use additional parentheses, e.g. 'give(player, (iron ore and gold ore))' (events.sk, line 5410: ShowToplist({_id},{_p})')
dont know what the problem is but have you ever considered splitting up your skript instead of it be 5000+ lines
 
Status
Not open for further replies.