Posts: 42
Threads: 22
Joined: May 2016
Hello, guys and girls. Please help me
arrivalsrv.pwn(4689) : error 029: invalid expression, assumed zero
arrivalsrv.pwn(4689) : error 008: must be a constant expression; assumed zero
Код:
#define MAX_LASSETA 9
new URLOnKasseta[MAX_LASSETA][Kassets] = {
{"Los Santos Academy","FM",1,"http://yp.shoutcast.com/sbin/tunein-station.pls?id=1029986"},//1
{"Red County","FM",1,"http://yp.shoutcast.com/sbin/tunein-station.pls?id=241715"},//2
{"County Hits","FM",1,"http://yp.shoutcast.com/sbin/tunein-station.m3u?id=99194244"},//3
{"ABC French Rap","FM",1,"http://yp.shoutcast.com/sbin/tunein-station.pls?id=674462"},//4
{"Old School 99","FM",1,"http://yp.shoutcast.com/sbin/tunein-station.pls?id=38644"},//5
{"Techno Base","",2,"http://yp.shoutcast.com/sbin/tunein-station.pls?id=1564322"},//6
{"HouseTime.FM","24h House",2,"http://yp.shoutcast.com/sbin/tunein-station.pls?id=57352"},//7
{"TechnoBase.FM","Dance",2,"http://yp.shoutcast.com/sbin/tunein-station.pls?id=1564322"},//8
};
Posts: 1,506
Threads: 13
Joined: Jun 2015
17.12.2016, 07:25
(
Последний раз редактировалось Logic_; 17.12.2016 в 08:17.
)
Show us the enum 'Kassets'
and also use
const arrays where needed.
EDIT: Making the code according to what I understand...
PHP код:
#define MAX_LASSETA 9
enum Kassets
{
RadioName[25],
RadioType[10],
RadioLink[128];
};
new const URLOnKasseta[MAX_LASSETA][Kassets] =
{
{"Los Santos Academy", "FM", "http://yp.shoutcast.com/sbin/tunein-station.pls?id=1029986"},//1
{"Red County", "FM", "http://yp.shoutcast.com/sbin/tunein-station.pls?id=241715"},//2
{"County Hits", "FM", "http://yp.shoutcast.com/sbin/tunein-station.m3u?id=99194244"},//3
{"ABC French Rap", "FM", "http://yp.shoutcast.com/sbin/tunein-station.pls?id=674462"},//4
{"Old School 99", "FM", "http://yp.shoutcast.com/sbin/tunein-station.pls?id=38644"},//5
{"Techno Base", "FM", "http://yp.shoutcast.com/sbin/tunein-station.pls?id=1564322"},//6
{"HouseTime.FM", "24h House", "http://yp.shoutcast.com/sbin/tunein-station.pls?id=57352"},//7
{"TechnoBase.FM", "Dance", "http://yp.shoutcast.com/sbin/tunein-station.pls?id=1564322"}//8
};
CMD:radio(playerid)
{
new str[25 * MAX_LASSETA];
strcat(str, "Radio Name\tRadio Type");
for(new i; i < MAX_LASSETA; i++)
{
format(str, sizeof str, "%s%s\t%s", str, URLOnKasseta[i][RadioName], URLOnKasseta[i][RadioType]);
}
ShowPlayerDialog(playerid, DIALOG_ID, DIALOG_STYLE_TABLIST_HEADERS, "Radio", str, "Stream", "Cancel");
return 1;
}
Posts: 42
Threads: 22
Joined: May 2016
The guy was a different situation, I did not notice that he wrote one and the same line. The system itself is already written.