error 029 - 008
#1

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
};
Reply
#2

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 
iMAX_LASSETAi++)
    {
        
format(strsizeof str"%s%s\t%s"strURLOnKasseta[i][RadioName], URLOnKasseta[i][RadioType]);
    }
    
ShowPlayerDialog(playeridDIALOG_IDDIALOG_STYLE_TABLIST_HEADERS"Radio"str"Stream""Cancel");
    return 
1;

Reply
#3

PHP код:
{"TechnoBase.FM","Dance",2,"http://yp.shoutcast.com/sbin/tunein-station.pls?id=1564322"}//8 
You should remove the comma. You shouldn't place a comma in the last one, remove it.
Reply
#4

The guy was a different situation, I did not notice that he wrote one and the same line. The system itself is already written.
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)