C:\Users\Admin\Desktop\SA-MP server\gamemodes\SEG.pwn(95) : error 052: multi-dimensional arrays must be fully initialized Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 1 Error.
new VehicleRadioListing[220][VehicleRadioEnum] = { // Pop {"Antenna Roma","http://yp.shoutcast.com/sbin/tunein-station.pls?id=532626"}, {"LOLLIRADIO HAPPY STATION","http://yp.shoutcast.com/sbin/tunein-station.pls?id=87485"}, {"radio 24 here","http://yp.shoutcast.com/sbin/tunein-station.pls?id=99181833"}, {"181.FM - Old School","http://yp.shoutcast.com/sbin/tunein-station.pls?id=190767"}, // R&B/Urban {"The RnB Channel","http://yp.shoutcast.com/sbin/tunein-station.pls?id=96672"}, {"A-RnB-FM-WEB1","http://yp.shoutcast.com/sbin/tunein-station.pls?id=580345"}, {"2000s RnB","http://yp.shoutcast.com/sbin/tunein-station.pls?id=704077"}, {"A_A Hip Hop","http://yp.shoutcast.com/sbin/tunein-station.pls?id=92954"}, {"Free Radio 88.1FM","http://yp.shoutcast.com/sbin/tunein-station.pls?id=843099"}, // Rap {"MixAir","http://yp.shoutcast.com/sbin/tunein-station.pls?id=780533"}, {"HOT 108 JAMZ","http://yp.shoutcast.com/sbin/tunein-station.pls?id=8318"}, {"East Coast Hip-Hop","http://yp.shoutcast.com/sbin/tunein-station.pls?id=99190752"}, {"Ruff Draft","http://yp.shoutcast.com/sbin/tunein-station.pls?id=193629"}, {"One Love Hip-Hop","http://yp.shoutcast.com/sbin/tunein-station.pls?id=288144"}, {"Beat FM","http://yp.shoutcast.com/sbin/tunein-station.pls?id=137513"}, // Reggae {"A.1.ONE.BOB.MARLEY.AND.CO","http://yp.shoutcast.com/sbin/tunein-station.pls?id=99188922"}, {"Raggakings Radio - 24/7","http://yp.shoutcast.com/sbin/tunein-station.pls?id=621233"}, {"GotRadio - Reggae Rasta & Roots","http://yp.shoutcast.com/sbin/tunein-station.pls?id=580044"}, {"Jugglerz Radio - 24/7 Reggae","http://yp.shoutcast.com/sbin/tunein-station.pls?id=348491"}, {"crazy vibez","http://yp.shoutcast.com/sbin/tunein-station.pls?id=52415"}, {"Kulcha Shok Radio","http://yp.shoutcast.com/sbin/tunein-station.pls?id=136434"}, {"Reggae Radio Rasta","http://yp.shoutcast.com/sbin/tunein-station.pls?id=405880"} }; RED Is the problem
enum VehicleRadioEnum { radioname[32], radiourl[128], listeners }
CMD:setstation(playerid, params[]) { if(!IsPlayerInAnyVehicle(playerid)) { return SendClientMessageEx(playerid, COLOR_GRAD2, "You must be in a car to use a car radio."); } else if(isnull(params)) { SendClientMessageEx(playerid, COLOR_GRAD2, "USAGE: /setstation [station] (0 - 3)"); SendClientMessageEx(playerid, COLOR_GRAD2, "(0) Stop Radio (1) Hot 108 Jamz - (2) Los Santos Radio - (3) #1 Stop for Hip Hop"); return 1; } new string[128], station[256]; switch(strval(params)) { case 0: { format(string, sizeof(string), "%s turns off the radio.",GetPlayerNameEx(playerid)); foreach(Player, i) if(GetPlayerVehicleID(i) == GetPlayerVehicleID(playerid)){ StopAudioStreamForPlayer(i); //stationidp[i] = 0; stationidv[GetPlayerVehicleID(playerid)] = 0; } } case 1: { format(string, sizeof(string), "%s changes the station to Hot 108 Jamz.",GetPlayerNameEx(playerid)); PlayAudioStreamForPlayer(playerid, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=1281016"); stationidv[GetPlayerVehicleID(playerid)] = 1; } case 2: { format(string, sizeof(string), "%s changes the station to Los Santos Radio.",GetPlayerNameEx(playerid)); PlayAudioStreamForPlayer(playerid, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=1280356"); stationidv[GetPlayerVehicleID(playerid)] = 2; } case 3: { format(string, sizeof(string), "%s changes the station to #1 stop for Hip Hop",GetPlayerNameEx(playerid)); PlayAudioStreamForPlayer(playerid, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=1269052"); stationidv[GetPlayerVehicleID(playerid)] = 3; } default: return SendClientMessageEx(playerid, COLOR_GRAD2, "Invalid station specified."); } ProxDetector(5.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE); foreach(Player, i) if(GetPlayerVehicleID(i) == GetPlayerVehicleID(playerid) && Audio_IsClientConnected(i)) { Audio_Stop(i, stationidp[i]); stationidp[i] = Audio_PlayStreamed(i, station, false, true, false); Audio_SetVolume(i, stationidp[i], 30); } return 1; } CMD:setradio(playerid, params[]) { if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER) ShowPlayerDialog(playerid, DIALOG_RADIOMENU_START, DIALOG_STYLE_LIST, "Radio station", "Turn off radio\nSearch by name\nFind by genre", "Select", "Cancel"); else SendClientMessage(playerid, COLOR_GRAD1, "You're not driving any vehicle."); return 1; } CMD:setvolume(playerid, params[]) { new iVolume = strval(params); if(!IsPlayerInAnyVehicle(playerid)) { return SendClientMessageEx(playerid, COLOR_GRAD2, "You must be in a car to use a car radio."); } else if(isnull(params)) { return SendClientMessageEx(playerid, COLOR_GRAD2, "USAGE: /setvolume [volume] (0-100)"); } else if(!(0 <= iVolume <= 100)) { return SendClientMessageEx(playerid, COLOR_GRAD2, "Volume must be between 0 and 100."); } else { new string[36 + MAX_PLAYER_NAME]; format(string, sizeof(string), "* %s changes the radio volume to %d.", GetPlayerNameEx(playerid), iVolume); ProxDetector(5.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE); volumeidv[GetPlayerVehicleID(playerid)] = iVolume; foreach(Player, i) { if(GetPlayerVehicleID(i) == GetPlayerVehicleID(playerid)) { Audio_SetVolume(i, stationidp[i], iVolume); } } } return 1; }
enum VehicleRadioEnum
{
radioname[32],
radiourl[128]
}
new VehicleRadioListing[][VehicleRadioEnum] = {
// Pop
{"Antenna Roma","http://yp.shoutcast.com/sbin/tunein-station.pls?id=532626"},
{"LOLLIRADIO HAPPY STATION","http://yp.shoutcast.com/sbin/tunein-station.pls?id=87485"},
{"radio 24 here","http://yp.shoutcast.com/sbin/tunein-station.pls?id=99181833"},
{"181.FM - Old School","http://yp.shoutcast.com/sbin/tunein-station.pls?id=190767"},
// R&B/Urban
{"The RnB Channel","http://yp.shoutcast.com/sbin/tunein-station.pls?id=96672"},
{"A-RnB-FM-WEB1","http://yp.shoutcast.com/sbin/tunein-station.pls?id=580345"},
{"2000s RnB","http://yp.shoutcast.com/sbin/tunein-station.pls?id=704077"},
{"A_A Hip Hop","http://yp.shoutcast.com/sbin/tunein-station.pls?id=92954"},
{"Free Radio 88.1FM","http://yp.shoutcast.com/sbin/tunein-station.pls?id=843099"},
// Rap
{"MixAir","http://yp.shoutcast.com/sbin/tunein-station.pls?id=780533"},
{"HOT 108 JAMZ","http://yp.shoutcast.com/sbin/tunein-station.pls?id=8318"},
{"East Coast Hip-Hop","http://yp.shoutcast.com/sbin/tunein-station.pls?id=99190752"},
{"Ruff Draft","http://yp.shoutcast.com/sbin/tunein-station.pls?id=193629"},
{"One Love Hip-Hop","http://yp.shoutcast.com/sbin/tunein-station.pls?id=288144"},
{"Beat FM","http://yp.shoutcast.com/sbin/tunein-station.pls?id=137513"},
// Reggae
{"A.1.ONE.BOB.MARLEY.AND.CO","http://yp.shoutcast.com/sbin/tunein-station.pls?id=99188922"},
{"Raggakings Radio - 24/7","http://yp.shoutcast.com/sbin/tunein-station.pls?id=621233"},
{"GotRadio - Reggae Rasta & Roots","http://yp.shoutcast.com/sbin/tunein-station.pls?id=580044"},
{"Jugglerz Radio - 24/7 Reggae","http://yp.shoutcast.com/sbin/tunein-station.pls?id=348491"},
{"crazy vibez","http://yp.shoutcast.com/sbin/tunein-station.pls?id=52415"},
{"Kulcha Shok Radio","http://yp.shoutcast.com/sbin/tunein-station.pls?id=136434"},
{"Reggae Radio Rasta","http://yp.shoutcast.com/sbin/tunein-station.pls?id=405880"}
};
PHP код:
|