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 [Skript] No matching constructor

Discussion in 'Skript' started by Uzumaki, Feb 11, 2019.

  1. Uzumaki

    Uzumaki Well-Known Member

    Joined:
    Feb 20, 2017
    Messages:
    286
    Likes Received:
    8
    Code (Text):
    1. import:
    2.     java.io.File
    3.     com.xxmicloxx.NoteBlockAPI.NoteBlockAPI
    4.     com.xxmicloxx.NoteBlockAPI.songplayer.SongPlayer
    5.     com.xxmicloxx.NoteBlockAPI.NBSDecoder
    6.     com.xxmicloxx.NoteBlockAPI.songplayer.RadioSongPlayer  
    7.  
    8. command play:
    9.     trigger:
    10.         set {_file} to NBSDecoder.parse(new File("plugins/Songs/Africa.nbs"))
    11.         set {_song} to new RadioSongPlayer({_file})
    12.         {_song}.setAutoDestroy(true)
    13.         {_song}.addPlayer(player)
    14.         {_song}.setPlaying(true)
    Code (Text):
    1. [19:48:49 WARN]: [Skript] No matching constructor: RadioSongPlayer#<init> called with ([email protected] (Song))
    any idea why?

     
  2. Best Answer:
    Post #4 by MartinOdum, Feb 14, 2019 at 1:25 AM
  3. Vrganj

    Vrganj Active Member

    Joined:
    Dec 1, 2018
    Messages:
    30
    Likes Received:
    1
    Is that Africa by Toto?
    --- Double Post Merged, Feb 11, 2019, Original Post Date: Feb 11, 2019 ---
    upload_2019-2-11_22-55-48.png No clue about this shit, but maybe you need a song, not a file
     
  4. Uzumaki

    Uzumaki Well-Known Member

    Joined:
    Feb 20, 2017
    Messages:
    286
    Likes Received:
    8
    it requires a .nbs file
    Untitled.png
     
    #3 Uzumaki, Feb 11, 2019
    Last edited: Feb 11, 2019
  5. MartinOdum

    MartinOdum Member

    Joined:
    Jan 26, 2017
    Messages:
    111
    Likes Received:
    13
    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
    --- Double Post Merged, Feb 14, 2019 at 1:25 AM, Original Post Date: Feb 13, 2019 at 6:47 AM ---
    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 (Text):
    1. import:
    2.     java.io.File
    3.     com.xxmicloxx.NoteBlockAPI.NBSDecoder
    4.     com.xxmicloxx.NoteBlockAPI.RadioSongPlayer
    5.  
    6. command /playsong:
    7.     trigger:
    8.         set {_file2} to NBSDecoder.parse(new File("plugins/Songs/Friday.nbs"))
    9.         set {_song} to New RadioSongPlayer({_file2})
    10.         {_song}.setAutoDestroy(true)
    11.         {_song}.addPlayer(player)
    12.         {_song}.setPlaying(true)
     
    • Agree Agree x 1
  6. Uzumaki

    Uzumaki Well-Known Member

    Joined:
    Feb 20, 2017
    Messages:
    286
    Likes Received:
    8
Loading...