Weird switch problem!
#8

pawn Код:
new append[MAX_PLAYERS][3];
            GetPlayerName(playerid, pName2, sizeof(pName2));
            format(rFile, sizeof(rFile), "/Race/%s.txt", RaceName);
            //SetTimerEx("OnPlayerFinishCount",1000,0,"dd",playerid,Position);
            Position++;
            switch(Position)
            {
                case 1:
                {
                    SendClientMessage(playerid,COLOR_ORANGE,"Case viens1");
                    Prize[playerid][0] = dini_Int(rFile,"rPrizeMoney")+(random(dini_Int(rFile,"rPrizeMoneyBonus")*10));
                    Prize[playerid][1] = dini_Int(rFile,"rPrizeExp")+(random(dini_Int(rFile,"rPrizeExpBonus")*10));
                    SendClientMessage(playerid,COLOR_ORANGE,"Case viens2");
                    EndRaceCount = 60;
                    EndRaceTimer = SetTimer("CountTillRaceEnd",999,1);
                    dUserSetINT(pName(playerid)).("RaceFirst",dUserINT(pName(playerid)).("RaceFirst")+1);
                }
                case 2:
                {
                    SendClientMessage(playerid,COLOR_ORANGE,"Case du1");
                    Prize[playerid][0] = dini_Int(rFile,"rPrizeMoney")+(random(dini_Int(rFile,"rPrizeMoneyBonus")*9));
                    Prize[playerid][1] = dini_Int(rFile,"rPrizeExp")+(random(dini_Int(rFile,"rPrizeExpBonus")*9));
                    SendClientMessage(playerid,COLOR_ORANGE,"Case du2");
                    dUserSetINT(pName(playerid)).("RaceSecond",dUserINT(pName(playerid)).("RaceSecond")+1);
                }
                case 3:
                {
                    Prize[playerid][0] = dini_Int(rFile,"rPrizeMoney")+(random(dini_Int(rFile,"rPrizeMoneyBonus")*8));
                    Prize[playerid][1] = dini_Int(rFile,"rPrizeExp")+(random(dini_Int(rFile,"rPrizeExpBonus")*8));
                    dUserSetINT(pName(playerid)).("RaceThird",dUserINT(pName(playerid)).("RaceThird")+1);
                }
                case 4:
                {
                    Prize[playerid][0] = dini_Int(rFile,"rPrizeMoney")+(random(dini_Int(rFile,"rPrizeMoneyBonus")*7));
                    Prize[playerid][1] = dini_Int(rFile,"rPrizeExp")+(random(dini_Int(rFile,"rPrizeExpBonus")*7));
                }
                case 5:
                {
                    Prize[playerid][0] = dini_Int(rFile,"rPrizeMoney")+(random(dini_Int(rFile,"rPrizeMoneyBonus")*6));
                    Prize[playerid][1] = dini_Int(rFile,"rPrizeExp")+(random(dini_Int(rFile,"rPrizeExpBonus")*6));
                }
                case 6:
                {
                    Prize[playerid][0] = dini_Int(rFile,"rPrizeMoney")+(random(dini_Int(rFile,"rPrizeMoneyBonus")*5));
                    Prize[playerid][1] = dini_Int(rFile,"rPrizeExp")+(random(dini_Int(rFile,"rPrizeExpBonus")*5));
                }
                case 7:
                {
                    Prize[playerid][0] = dini_Int(rFile,"rPrizeMoney")+(random(dini_Int(rFile,"rPrizeMoneyBonus")*4));
                    Prize[playerid][1] = dini_Int(rFile,"rPrizeExp")+(random(dini_Int(rFile,"rPrizeExpBonus")*4));
                }
                case 8:
                {
                    Prize[playerid][0] = dini_Int(rFile,"rPrizeMoney")+(random(dini_Int(rFile,"rPrizeMoneyBonus")*3));
                    Prize[playerid][1] = dini_Int(rFile,"rPrizeExp")+(random(dini_Int(rFile,"rPrizeExpBonus")*3));
                }
                case 9:
                {
                    Prize[playerid][0] = dini_Int(rFile,"rPrizeMoney")+(random(dini_Int(rFile,"rPrizeMoneyBonus")*2));
                    Prize[playerid][1] = dini_Int(rFile,"rPrizeExp")+(random(dini_Int(rFile,"rPrizeExpBonus")*2));
                }
                default:
                {
                    Prize[playerid][0] = dini_Int(rFile,"rPrizeMoney")+(random(dini_Int(rFile,"rPrizeMoneyBonus")*1));
                    Prize[playerid][1] = dini_Int(rFile,"rPrizeExp")+(random(dini_Int(rFile,"rPrizeExpBonus")*1));
                }
            }
            switch(Position)
            {
                case 1: format(append[playerid], 3, "st");
                case 2: format(append[playerid], 3, "nd");
                case 3: format(append[playerid], 3, "rd");
                default: format(append[playerid], 3, "th");
            }
I have updated the code and discovered that the PRIZE thing mess this up, i get the message before the prize which is : Case viens1 but after the prize i dont get the msg, i triple-quadruple checked the files they have those variables in them i compared both of 'em a letter to letter
Reply


Messages In This Thread
Weird switch problem! - by 0ne - 08.11.2010, 15:51
Re: Weird switch problem! - by BuLLeT[LTU] - 08.11.2010, 16:19
Re: Weird switch problem! - by BuLLeT[LTU] - 09.11.2010, 10:21
Re: Weird switch problem! - by Retardedwolf - 09.11.2010, 10:23
Re: Weird switch problem! - by 0ne - 09.11.2010, 11:07
Re: Weird switch problem! - by iggy1 - 09.11.2010, 11:15
Re: Weird switch problem! - by 0ne - 09.11.2010, 12:01
Re: Weird switch problem! - by 0ne - 09.11.2010, 12:40
Re: Weird switch problem! - by 0ne - 10.11.2010, 11:18
Re: Weird switch problem! - by 0ne - 11.11.2010, 10:54

Forum Jump:


Users browsing this thread: 3 Guest(s)