PlayAudioStreamForPlayer and Arrays BUG
#3

Quote:
Originally Posted by Konstantinos
Посмотреть сообщение
It needs to be a 3D array because you also need the lenght of the strings.
pawn Код:
new RockStations[ ][ ][ ] =
{
    {"181.fm - The Buzz!", "http://yp.shoutcast.com/sbin/tunein-station.pls?id=37586"},
    {"Radio Paradise", "http://yp.shoutcast.com/sbin/tunein-station.pls?id=785339"},
    {"181.fm - Awesome 80's", "http://yp.shoutcast.com/sbin/tunein-station.pls?id=785339"},
    {"idobi Radio", "http://yp.shoutcast.com/sbin/tunein-station.pls?id=914897"},
    {"Star.fm - Maximum Rock!", "http://yp.shoutcast.com/sbin/tunein-station.pls?id=108588"},
    {"181.fm - 90's Alternative", "http://yp.shoutcast.com/sbin/tunein-station.pls?id=1034265"},
    {"181.fm - Hard Rock Heaven", "http://yp.shoutcast.com/sbin/tunein-station.pls?id=106750"}
};
I have tried multiple methods in getting this bit of advice to work, but no such luck!
Here is what I have implemented based on your advice. It's still not playing the audio streams as it should. It all seems fine to me, I can't find any problems. I've even tried using the array for SendClientMessage, and it worked as it should, printed everything out normally. But this is still happening.



That is an image of me selecting each list item, one by one, from the top of the list.

Here is the bits of code I changed.

pawn Код:
if(dialogid == RADIO_GENRE_ROCK)
    {
        if(!response)
        {
            DisplayMain(playerid);
            return 1;
        }
        foreach(Player, i)
        {
            new veh = GetPlayerVehicleID(playerid);
            if(GetPlayerVehicleID(i) == veh)
            {
                PlayAudioStreamForPlayer(i, RockStations[listitem][1][60]); //60 being the size of the string.
                SetPVarInt(i, "Streaming", 1);
            }
        }
    }
pawn Код:
new RockStations [] [] [] =
{
    {"181.fm - The Buzz!", "http://yp.shoutcast.com/sbin/tunein-station.pls?id=37586"},
    {"Radio Paradise", "http://yp.shoutcast.com/sbin/tunein-station.pls?id=785339"},
    {"181.fm - Awesome 80's", "http://yp.shoutcast.com/sbin/tunein-station.pls?id=785339"},
    {"idobi Radio", "http://yp.shoutcast.com/sbin/tunein-station.pls?id=914897"},
    {"Star.fm - Maximum Rock!", "http://yp.shoutcast.com/sbin/tunein-station.pls?id=108588"},
    {"181.fm - 90's Alternative", "http://yp.shoutcast.com/sbin/tunein-station.pls?id=1034265"},
    {"181.fm - Hard Rock Heaven", "http://yp.shoutcast.com/sbin/tunein-station.pls?id=106750"}
};
If anyone could provide me with some insight... I'd be so thankful! I have spent quite a deal of time writing this system as a whole, and this tiny problem is making everything seem impossible!

Thank you!

EDIT: Could I maybe switch out the order of the array and have the names second?
Reply


Messages In This Thread
PlayAudioStreamForPlayer and Arrays BUG - by Vexus - 05.09.2013, 17:51
Re: PlayAudioStreamForPlayer and Arrays BUG - by Konstantinos - 05.09.2013, 18:05
Re: PlayAudioStreamForPlayer and Arrays BUG - by Vexus - 09.09.2013, 03:57
Re: PlayAudioStreamForPlayer and Arrays BUG - by Pottus - 09.09.2013, 04:02
Re: PlayAudioStreamForPlayer and Arrays BUG - by Vexus - 09.09.2013, 04:06
Re: PlayAudioStreamForPlayer and Arrays BUG - by Pottus - 09.09.2013, 04:09
Re: PlayAudioStreamForPlayer and Arrays BUG - by Vexus - 09.09.2013, 04:28
Re: PlayAudioStreamForPlayer and Arrays BUG - by Pottus - 09.09.2013, 04:31

Forum Jump:


Users browsing this thread: 1 Guest(s)