Does not receive any messages. Please help
#2

Could 'CurrentMsg' be zero? If so you have no zero case.
pawn Код:
forward Msg();
public Msg()
{
    switch(CurrentMsg) {
        case 1:
        {
            SetWeather(0);
            SendClientMessageToAll(0xFFFFFFFF,"METAR INFO: | Weather: {00FF00}Sunny Skies");
            return 1;
        }
        case 2:
        {
            SetWeather(8);
            SendClientMessageToAll(0xFFFFFFFF,"METAR INFO: | Weather: {FF0000}Rainstorm");
            return 1;
        }
        case 3:
        {
            SetWeather(2);
            SendClientMessageToAll(0xFFFFFFFF,"METAR INFO: | Weather: {00FF00}Sunny Skies");
            return 1;
        }
        case 4:
        {
            SetWeather(9);
            SendClientMessageToAll(0xFFFFFFFF,"METAR INFO: | Weather: {FF0000}Thick Fog");
            return 1;
        }
        case 5:
        {
            SetWeather(1);
            SendClientMessageToAll(0xFFFFFFFF,"METAR INFO: | Weather: {00FF00}Moderate Sunny");
            return 1;
        }
        case 6:
        {
            SetWeather(20);
            SendClientMessageToAll(0xFFFFFFFF,"METAR INFO: | Weather: {FF0000}Toxic Green Smog{FFFFFF} | Visibility: {FF0000}Low{FFFFFF} | Winds: {FF9900}Moderate{FFFFFF} | Clouds: {FF0000}Heavy{FFFFFF}");
            return 1;
        }
        case 7:
        {
            SetWeather(3);
            SendClientMessageToAll(0xFFFFFFFF,"METAR INFO: | Weather: {00FF00}Sunny Skies");
            return 1;
        }
        case 8:
        {
            SetWeather(19);
            SendClientMessageToAll(0xFFFFFFFF,"METAR INFO: | Weather: {FF0000)Sand Storm");
            return 1;
        }
        case 9:
        {
            SetWeather(1);
            SendClientMessageToAll(0xFFFFFFFF,"METAR INFO: | Weather: {00FF00}Moderate Sunny Skies");
            return 1;
        }
        case 10:
        {
            SetWeather(1);
            SendClientMessageToAll(0xFFFFFFFF,"METAR INFO: | Weather: {00FF00}Moderate Sunny Skies");
            return 1;
        }
        case 11:
        {
            SetWeather(8);
            SendClientMessageToAll(0xFFFFFFFF,"METAR INFO: | Weather: {FF0000}Rainstorm");
            return 1;
        }
        case 12:
        {
            SetWeather(0);
            SendClientMessageToAll(0xFFFFFFFF,"METAR INFO: | Weather: {00FF00}Moderate Sunny Skies");
            return 1;
        }
        case 13:
        {
            SetWeather(8);
            SendClientMessageToAll(0xFFFFFFFF,"METAR INFO: | Weather: {FF0000}Rainstorm");
            return 1;
        }
        case 14:
        {
            SetWeather(2);
            SendClientMessageToAll(0xFFFFFFFF,"METAR INFO: | Weather: {00FF00}Moderate Sunny Skies");
            return 1;
        }
        case 15:
        {
            SetWeather(9);
            SendClientMessageToAll(0xFFFFFFFF,"METAR INFO: | Weather: {FF0000}Thick Fog");
            return 1;
        }
        case 16:
        {
            SetWeather(1);
            SendClientMessageToAll(0xFFFFFFFF,"METAR INFO: | Weather: {00FF00}Moderate Sunny Skies");
            return 1;
        }
        case 17:
        {
            SetWeather(20);
            SendClientMessageToAll(0xFFFFFFFF,"METAR INFO: | Weather: {FF0000}Toxic Green Smog");
            return 1;
        }
        case 18:
        {
            SetWeather(3);
            SendClientMessageToAll(0xFFFFFFFF,"METAR INFO: | Weather: {00FF00}Sunny Skies");
            return 1;
        }
        case 19:
        {
            SetWeather(19);
            SendClientMessageToAll(0xFFFFFFFF,"METAR INFO: | Weather: {FF0000)Sand Storm");
            return 1;
        }
        case 20:
        {
            SetWeather(1);
            SendClientMessageToAll(0xFFFFFFFF,"METAR INFO: | Weather: {00FF00}Moderate Sunny Skies");
            return 1;
        }
        case 21:
        {
            SetWeather(27);
            SendClientMessageToAll(0xFFFFFFFF,"METAR INFO: | Weather: {00FF00}Moderate Sunny Skies");
            return 1;
        }
        case 22:
        {
            SetWeather(8);
            SendClientMessageToAll(0xFFFFFFFF,"METAR INFO: | Weather: {FF0000}Rainstorm");
            return 1;
        }
        case 23:
        {
            SetWeather(0);
            SendClientMessageToAll(0xFFFFFFFF,"METAR INFO: | Weather: {00FF00}Sunny Skies");
            return 1;
        }
       
        default:
        {
            printf("ERROR: CurrentMsg == %d", CurrentMsg );
        }

    }
    return 1;
}
Reply


Messages In This Thread
Does not receive any messages. Please help - by Neil. - 30.05.2012, 17:13
Re: Does not receive any messages. Please help - by iggy1 - 30.05.2012, 17:15
Re: Does not receive any messages. Please help - by Neil. - 30.05.2012, 17:27
Re: Does not receive any messages. Please help - by peterory - 30.05.2012, 17:36
Re: Does not receive any messages. Please help - by Neil. - 30.05.2012, 17:54

Forum Jump:


Users browsing this thread: 1 Guest(s)