fuck me ;/
#1

ok I have a problem. Client Text doesn't send for a player at a point, dunno what's wrong ;/

here's the code. I've comented the lines where it doesn't send it.
pawn Код:
if(regStep[playerid] > 0)
    {
        switch(regStep[playerid])
        {
            case 1:
                {
                    switch(text[0])
                    {
                        case 'm':
                            {
                                SendClientMessage(playerid, COLOR_LIGHTBLUE, "* [SYSTEM] Ok, so you're a guy. How old are you? \n (input age 16-72) ");
                                PlayerInfo[playerid][pSex] = 1;
                                regStep[playerid] = 2;
                            }
                        case 'f':
                            {
                                SendClientMessage(playerid, COLOR_LIGHTBLUE, "* [SYSTEM] Ok, so you're a girl. How old are you? \n (input age 16-72) ");
                                PlayerInfo[playerid][pSex] = 2;
                                regStep[playerid] = 2;
                            }
                        default:
                            {
                                SendClientMessage(playerid, COLOR_LIGHTBLUE, "* [SYSTEM] Are you a guy or a girl? (input [m]ale or [f]emale) ");
                            }
                    }
                }
            case 2:
                {
                    switch(strval(text))
                    {
                        case 16 .. 72:
                            {
                                new tmp_text[128];
                                format(tmp_text, 128, "* [SYSTEM] I see, so you're %d years old. Where do you come from? \n([e]urope, [a]sia or [u]sa) ", strval(text));
                                SendClientMessage(playerid, COLOR_LIGHTBLUE, tmp_text);
                                PlayerInfo[playerid][pAge] = strval(text);
                                regStep[playerid] = 3;
                            }
                        default:
                            {
                                SendClientMessage(playerid, COLOR_LIGHTBLUE, "* [SYSTEM] How old are you? (input age 16-72) ");
                            }
                    }
                }
            case 3:
                {
                    switch(text[0])
                    {
                        case 'e':
                            {
                                SendClientMessage(playerid, COLOR_LIGHTBLUE, "* [SYSTEM] Ok, so you're from europe. What tan do you have? \n([l]ight, [m]edium or [d]ark) ");
                                PlayerInfo[playerid][pOrigin] = 1;
                                regStep[playerid] = 4;
                            }
                        case 'a':
                            {
                                SendClientMessage(playerid, COLOR_LIGHTBLUE, "* [SYSTEM] Ok, so you're from asia. What tan do you have? \n([l]ight, [m]edium or [d]ark) ");
                                PlayerInfo[playerid][pOrigin] = 2;
                                regStep[playerid] = 4;
                            }
                        case 'u':
                            {
                                SendClientMessage(playerid, COLOR_LIGHTBLUE, "* [SYSTEM] Ok, so you're from the USA. What tan do you have? \n([l]ight, [m]edium or [d]ark) ");
                                PlayerInfo[playerid][pOrigin] = 3;
                                regStep[playerid] = 4;
                            }
                        default:
                            {
                                SendClientMessage(playerid, COLOR_LIGHTBLUE, "* [SYSTEM] Where do you come from? \n([e]urope, [a]sia or [u]sa) ");
                            }
                    }
                }
            case 4:
                {
                        switch(text[0])
                        {
/*                          case 'l':
                                {
                                    SendClientMessage(playerid, COLOR_LIGHTBLUE, "* [SYSTEM] Ahh, you're pale, huh? Ok... What accent do you have? \n([i]talian, [a]merican, [b]ritish, [g]erman, [r]ussian, [j]apanese or [c]hinese) ");
                                    PlayerInfo[playerid][pTan] = 1;
                                    SkinSlot[playerid][0] = rand_skins[PlayerInfo[playerid][pSex]-1][PlayerInfo[playerid][pTan]-1]
                                    SkinSlot[playerid][1] = rand_swimwear[PlayerInfo[playerid][pSex]-1][PlayerInfo[playerid][pTan]-1];
                                    SkinWearing[playerid] = 0;
                                    regStep[playerid] = 5;
                                }
                            case 'm':
                                {
                                    SendClientMessage(playerid, COLOR_LIGHTBLUE, "* [SYSTEM] You're so tanned it's almost criminal... What your accent? \n([i]talian, [a]merican, [b]ritish, [g]erman, [r]ussian, [j]apanese or [c]hinese) ");
                                    PlayerInfo[playerid][pTan] = 2;
                                    SkinSlot[playerid][0] = rand_skins[PlayerInfo[playerid][pSex]-1][PlayerInfo[playerid][pTan]-1];
                                    SkinSlot[playerid][1] = rand_swimwear[PlayerInfo[playerid][pSex]-1][PlayerInfo[playerid][pTan]-1];
                                    SkinWearing[playerid] = 0;
                                    regStep[playerid] = 5;
                                }
                            case 'd':
                                {
                                    SendClientMessage(playerid, COLOR_LIGHTBLUE, "* [SYSTEM] So you're black, huh? Ok... What accent do you have? \n([i]talian, [a]merican, [b]ritish, [g]erman, [r]ussian, [j]apanese or [c]hinese) ");
                                    PlayerInfo[playerid][pTan] = 3;
                                    SkinSlot[playerid][0] = rand_skins[PlayerInfo[playerid][pSex]-1][PlayerInfo[playerid][pTan]-1];
                                    SkinSlot[playerid][1] = rand_swimwear[PlayerInfo[playerid][pSex]-1][PlayerInfo[playerid][pTan]-1];
                                    SkinWearing[playerid] = 0;
                                    regStep[playerid] = 5;
                                }*/

                            default:
                                {
                                    SendClientMessage(playerid, COLOR_LIGHTBLUE, "* [SYSTEM] What tan do you have? \n([l]ight, [m]edium or [d]ark) ");
                                }
                        }
                }
            case 5:
                {
                    switch(text[0])
                    {
                        case 'i':
                            {
                                SendClientMessage(playerid, COLOR_LIGHTBLUE, "* [SYSTEM] So you have italian accent. Great... ");
                                SendClientMessage(playerid, COLOR_LIGHTGREEN, "* [TUT] Tutoria will be initiated in 3 seconds. Please pay attention. ");
                                PlayerInfo[playerid][pAccent] = 1;
                                regStep[playerid] = 100;
                            }
                        case 'a':
                            {
                                SendClientMessage(playerid, COLOR_LIGHTBLUE, "* [SYSTEM] So you have american accent. Great... ");
                                SendClientMessage(playerid, COLOR_LIGHTGREEN, "* [TUT] Tutoria will be initiated in 3 seconds. Please pay attention. ");
                                PlayerInfo[playerid][pAccent] = 2;
                                regStep[playerid] = 100;
                            }
                        case 'b':
                            {
                                SendClientMessage(playerid, COLOR_LIGHTBLUE, "* [SYSTEM] So you have british accent. Great... ");
                                SendClientMessage(playerid, COLOR_LIGHTGREEN, "* [TUT] Tutoria will be initiated in 3 seconds. Please pay attention. ");
                                PlayerInfo[playerid][pAccent] = 3;
                                regStep[playerid] = 100;
                            }
                        case 'g':
                            {
                                SendClientMessage(playerid, COLOR_LIGHTBLUE, "* [SYSTEM] So you have german accent. Great... ");
                                SendClientMessage(playerid, COLOR_LIGHTGREEN, "* [TUT] Tutoria will be initiated in 3 seconds. Please pay attention. ");
                                PlayerInfo[playerid][pAccent] = 4;
                                regStep[playerid] = 100;
                            }
                        case 'r':
                            {
                                SendClientMessage(playerid, COLOR_LIGHTBLUE, "* [SYSTEM] So you have russian accent. Great... ");
                                SendClientMessage(playerid, COLOR_LIGHTGREEN, "* [TUT] Tutoria will be initiated in 3 seconds. Please pay attention. ");
                                PlayerInfo[playerid][pAccent] = 5;
                                regStep[playerid] = 100;
                            }
                        case 'j':
                            {
                                SendClientMessage(playerid, COLOR_LIGHTBLUE, "* [SYSTEM] So you have japanese accent. Great... ");
                                SendClientMessage(playerid, COLOR_LIGHTGREEN, "* [TUT] Tutoria will be initiated in 3 seconds. Please pay attention. ");
                                PlayerInfo[playerid][pAccent] = 6;
                                regStep[playerid] = 100;
                            }
                        case 'c':
                            {
                                SendClientMessage(playerid, COLOR_LIGHTBLUE, "* [SYSTEM] So you have chinese accent. Great... ");
                                SendClientMessage(playerid, COLOR_LIGHTGREEN, "* [TUT] Tutoria will be initiated in 3 seconds. Please pay attention. ");
                                PlayerInfo[playerid][pAccent] = 7;
                                regStep[playerid] = 100;
                            }
                        default:
                            {
                                SendClientMessage(playerid, COLOR_LIGHTBLUE, "* [SYSTEM] What accent do you have? \n([i]talian, [a]merican, [b]ritish, [g]erman, [r]ussian, [j]apanese or [c]hinese) ");
                            }
                    }
                }
        }
        return 0;
    }
What the heck is wrong? This is not the first time it doesn't print the way it should ;//
Reply
#2

I hate doing this...
Reply
#3

Sorry, but there's nothing wrong with your code. Try debugging by printing out the letter in text[0] every now and then
Reply
#4

thanks, i'll try
Reply
#5

how hsould I fix it anyway? everything goes right, it prins everything correct, but the funciton doesn't send the client a message ;/ what should I do ? HELP ME PLeASE
Reply
#6

shit, I can't fix this ;(
Reply
#7

Dude there's a edit button xD
Reply
#8

who gives a fuck about an edit buton when i'm too pissed to see? :/
Reply
#9

Maybe you have a too long message?
Reply
#10

It'd notify him of that.
Too much text on one line or something is an error in pawno.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)