Problem mit Radio-System

Wichtiger Hinweis: Bitte ändert nicht manuell die Schriftfarbe auf schwarz sondern belasst es bei der Standardeinstellung. Somit tragt ihr dazu bei dass euer Text auch bei Verwendung unseren dunklen Forenstils noch lesbar ist!

Tipp: Ihr wollt längere Codeausschnitte oder Logfiles bereitstellen? Benutzt unseren eigenen PasteBin-Dienst Link
  • Hey Community,
    Ich habe hier ein paar Probleme mit meinem Radiosystem.
    Code:
    #include <a_samp>
    //-----------------------------------------------------------------------------//
    #define DIALOG_RADIO 1


    if(strcmp(cmdtext, "/radio", true) == 0)
    {
    if(IsPlayerConnected(playerid))
    {
    ShowPlayerDialog(playerid, DIALOG_RADIO,DIALOG_STYLE_LIST, "Internet Radios", "Technobase.FM\nHousetime.FM\nILoveRadio.de\nByteFM\nTOP100 Station\nDubstep.FM\nRockland Radio!\nRauteMusic House\nRauteMusic Club\nRadio Aus", "Weiter", "Abbrechen");
    }
    return 1;
    }
    if(dialogid == DIALOG_RADIO)
    {
    if(response)
    {
    if(listitem == 0)
    {
    SendClientMessage(playerid, 0x00ABFFFF, "Technobase.FM!");
    PlayAudioStreamForPlayer(playerid, "http://listen.technobase.fm/dsl.pls");
    }
    if(listitem == 1)
    {
    SendClientMessage(playerid, 0x00ABFFFF, "Housetime.FM!");
    PlayAudioStreamForPlayer(playerid, "http://www.housetime.fm/wmplayer/");
    }
    if(listitem == 2)
    {
    SendClientMessage(playerid, 0x00ABFFFF, "ILoveRadio!");
    PlayAudioStreamForPlayer(playerid, "http://www.iloveradio.de/listen.pls");
    }
    if(listitem == 3)
    {
    SendClientMessage(playerid, 0x00ABFFFF, "ByteFM!");
    PlayAudioStreamForPlayer(playerid, "http://www.byte.fm/stream/bytefm.pls");
    }
    if(listitem == 4)
    {
    SendClientMessage(playerid, 0x00ABFFFF, "TOP100 Station!");
    PlayAudioStreamForPlayer(playerid, "http://www.top100station.de/switch/top100station.pls");
    }
    if(listitem == 5)
    {
    SendClientMessage(playerid, 0x00ABFFFF, "Dubstep.FM!");
    PlayAudioStreamForPlayer(playerid, "http://dubstep.fm/listen.pls");
    }
    if(listitem == 6)
    {
    SendClientMessage(playerid, 0x00ABFFFF, "Rockland Radio!");
    PlayAudioStreamForPlayer(playerid, "http://freestream.nmdn.net/freestream/download/rocklandradio/frameset.html");
    }
    if(listitem == 7)
    {
    SendClientMessage(playerid, 0x00ABFFFF, "RauteMusic House!");
    PlayAudioStreamForPlayer(playerid, "http://house-high.rautemusik.fm/rm.page//listen.pls");
    }
    if(listitem == 8)
    {
    SendClientMessage(playerid, 0x00ABFFFF, "RauteMusic Club!");
    PlayAudioStreamForPlayer(playerid, "http://club-high.rautemusik.fm/rm.page//listen.asx");
    }
    if(listitem == 9)
    {
    SendClientMessage(playerid, 0x00ABFFFF, "Radio Aus!");
    StopAudioStreamForPlayer(playerid);
    }
    return 1;
    }
    }


    public OnPlayerExitVehicle(playerid, vehicleid)
    {
    StopAudioStreamForPlayer(playerid);
    }
    return 1;
    }
    //-----------------------------------------------------------------------------//


    Compile-Fehler:
    C:\samp\pawno\RadioScript.pwn(9) : error 010: invalid function or declaration
    C:\samp\pawno\RadioScript.pwn(11) : error 010: invalid function or declaration
    C:\samp\pawno\RadioScript.pwn(15) : error 010: invalid function or declaration
    C:\samp\pawno\RadioScript.pwn(17) : error 010: invalid function or declaration
    C:\samp\pawno\RadioScript.pwn(19) : error 010: invalid function or declaration
    C:\samp\pawno\RadioScript.pwn(21) : error 010: invalid function or declaration
    C:\samp\pawno\RadioScript.pwn(26) : error 010: invalid function or declaration
    C:\samp\pawno\RadioScript.pwn(31) : error 010: invalid function or declaration
    C:\samp\pawno\RadioScript.pwn(36) : error 010: invalid function or declaration
    C:\samp\pawno\RadioScript.pwn(41) : error 010: invalid function or declaration
    C:\samp\pawno\RadioScript.pwn(46) : error 010: invalid function or declaration
    C:\samp\pawno\RadioScript.pwn(51) : error 010: invalid function or declaration
    C:\samp\pawno\RadioScript.pwn(56) : error 010: invalid function or declaration
    C:\samp\pawno\RadioScript.pwn(61) : error 010: invalid function or declaration
    C:\samp\pawno\RadioScript.pwn(66) : error 010: invalid function or declaration
    C:\samp\pawno\RadioScript.pwn(71) : error 010: invalid function or declaration
    C:\samp\pawno\RadioScript.pwn(79) : error 010: invalid function or declaration
    Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase



    17 Errors.

    Ich bin keine Signatur... Ich Putze hier nur.

  • Hier, habs dir gemacht:


    Du hast die ganzen Public's vergessen!


    #include <a_samp>


    //-----------------------------------------------------------------------------//
    #define DIALOG_RADIO 1


    public OnPlayerCommandText(playerid, cmdtext[])
    {
    if(strcmp(cmdtext, "/radio", true) == 0)
    {
    if(IsPlayerConnected(playerid))
    {
    ShowPlayerDialog(playerid, DIALOG_RADIO,DIALOG_STYLE_LIST, "Internet Radios", "Technobase.FM\nHousetime.FM\nILoveRadio.de\nByteFM\nTOP100 Station\nDubstep.FM\nRockland Radio!\nRauteMusic House\nRauteMusic Club\nRadio Aus", "Weiter", "Abbrechen");
    }
    return 1;
    }
    return 1;
    }


    public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
    {
    if(dialogid == DIALOG_RADIO)
    {
    if(response)
    {
    if(listitem == 0)
    {
    SendClientMessage(playerid, 0x00ABFFFF, "Technobase.FM!");
    PlayAudioStreamForPlayer(playerid, "http://listen.technobase.fm/dsl.pls");
    }
    if(listitem == 1)
    {
    SendClientMessage(playerid, 0x00ABFFFF, "Housetime.FM!");
    PlayAudioStreamForPlayer(playerid, "http://www.housetime.fm/wmplayer/");
    }
    if(listitem == 2)
    {
    SendClientMessage(playerid, 0x00ABFFFF, "ILoveRadio!");
    PlayAudioStreamForPlayer(playerid, "http://www.iloveradio.de/listen.pls");
    }
    if(listitem == 3)
    {
    SendClientMessage(playerid, 0x00ABFFFF, "ByteFM!");
    PlayAudioStreamForPlayer(playerid, "http://www.byte.fm/stream/bytefm.pls");
    }
    if(listitem == 4)
    {
    SendClientMessage(playerid, 0x00ABFFFF, "TOP100 Station!");
    PlayAudioStreamForPlayer(playerid, "http://www.top100station.de/switch/top100station.pls");
    }
    if(listitem == 5)
    {
    SendClientMessage(playerid, 0x00ABFFFF, "Dubstep.FM!");
    PlayAudioStreamForPlayer(playerid, "http://dubstep.fm/listen.pls");
    }
    if(listitem == 6)
    {
    SendClientMessage(playerid, 0x00ABFFFF, "Rockland Radio!");
    PlayAudioStreamForPlayer(playerid, "http://freestream.nmdn.net/freestream/download/rocklandradio/frameset.html");
    }
    if(listitem == 7)
    {
    SendClientMessage(playerid, 0x00ABFFFF, "RauteMusic House!");
    PlayAudioStreamForPlayer(playerid, "http://house-high.rautemusik.fm/rm.page//listen.pls");
    }
    if(listitem == 8)
    {
    SendClientMessage(playerid, 0x00ABFFFF, "RauteMusic Club!");
    PlayAudioStreamForPlayer(playerid, "http://club-high.rautemusik.fm/rm.page//listen.asx");
    }
    if(listitem == 9)
    {
    SendClientMessage(playerid, 0x00ABFFFF, "Radio Aus!");
    StopAudioStreamForPlayer(playerid);
    }
    return 1;
    }
    }
    return 1;
    }
    public OnPlayerExitVehicle(playerid, vehicleid)
    {
    StopAudioStreamForPlayer(playerid);
    return 1;
    }


    //-----------------------------------------------------------------------------//

  • Ohweia, die Publics sollte man natürlich nicht vergessen/entfernen.

  • Aber wenn man schonmal gescripted hat, dann kann man doch sowas nicht einfach vergessen.
    Naja, deine Sache. Niklas hat dir es ja fertig gemacht. :)

  • Hast du das unter OnDialogResponse gemacht? ^^


    MfG

    Ist doch erledigt, Niklas hat es doch gemacht, siehe hier .

    Einmal editiert, zuletzt von [NRL] TraXters () aus folgendem Grund: Rechtschreibung