Solved [Skript] No matching constructor

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

Uzumaki

Well-Known Member
Feb 20, 2017
310
10
18
33
Code:
import:
    java.io.File
    com.xxmicloxx.NoteBlockAPI.NoteBlockAPI
    com.xxmicloxx.NoteBlockAPI.songplayer.SongPlayer
    com.xxmicloxx.NoteBlockAPI.NBSDecoder
    com.xxmicloxx.NoteBlockAPI.songplayer.RadioSongPlayer   

command play:
    trigger:
        set {_file} to NBSDecoder.parse(new File("plugins/Songs/Africa.nbs"))
        set {_song} to new RadioSongPlayer({_file})
        {_song}.setAutoDestroy(true)
        {_song}.addPlayer(player)
        {_song}.setPlaying(true)

Code:
[19:48:49 WARN]: [Skript] No matching constructor: RadioSongPlayer#<init> called with (com.xxmicloxx.NoteBlockAPI.Song@2608f67b (Song))

any idea why?
 
Is that Africa by Toto?
[doublepost=1549922242,1549922003][/doublepost]
upload_2019-2-11_22-55-48.png
No clue about this shit, but maybe you need a song, not a file
 
I've been trying to get this to work myself, after reading through the api examples and everything I don't really know what to do differently, I tried a few different things but had no luck getthing the code to work either, if you end up finding the solution it would be awesome if you could share it, I will do the same if I figure it out aswell
[doublepost=1550107517,1550040436][/doublepost]Hey so I managed to get it working, seems like it was an issue with the one of the imports, here is what worked for me:

Code:
import:
    java.io.File
    com.xxmicloxx.NoteBlockAPI.NBSDecoder
    com.xxmicloxx.NoteBlockAPI.RadioSongPlayer

command /playsong:
    trigger:
        set {_file2} to NBSDecoder.parse(new File("plugins/Songs/Friday.nbs"))
        set {_song} to New RadioSongPlayer({_file2})
        {_song}.setAutoDestroy(true)
        {_song}.addPlayer(player)
        {_song}.setPlaying(true)
 
Status
Not open for further replies.