05.09.2013, 17:51
Good Morning!
I'm working on a system and there seems to be a bug that prevents the script from receiving the correct information from a few arrays I set up.
I'm not entirely knowledgeable on two dimensional arrays, so I came here hoping someone could give me some advice or guide me in the right direction!
Below is a cut from the code.
Here is what it displays when I choose the listitem.
That's nowhere near what the ID is supposed to be, as you can see from this bit of code.
( I chose the top one. )
If anyone requires further information, please don't hesitate to ask! I'm in dire need of fixing this!
Thank you!
I'm working on a system and there seems to be a bug that prevents the script from receiving the correct information from a few arrays I set up.
I'm not entirely knowledgeable on two dimensional arrays, so I came here hoping someone could give me some advice or guide me in the right direction!
Below is a cut from the code.
pawn Код:
if(dialogid == RADIO_GENRE_ROCK)
{
if(response)
{
foreach(Player, i)
{
if(IsPlayerInAnyVehicle(i))
{
new veh = GetPlayerVehicleID(playerid);
if(GetPlayerVehicleID(i) == veh)
{
PlayAudioStreamForPlayer(i, RockStations[listitem][1]);
vInfo[veh][rStation] = RockStations[listitem][1];
SetPVarInt(i, "Streaming", 1);
}
}
}
}
return 1;
}
That's nowhere near what the ID is supposed to be, as you can see from this bit of code.
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 requires further information, please don't hesitate to ask! I'm in dire need of fixing this!
Thank you!