SA-MP Forums Archive
Will this work? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Will this work? (/showthread.php?tid=424229)



Will this work? - Don_Cage - 21.03.2013

Hello I need awnser from here since I dont want to disturb the other players if it dont work.. Anyway this is what I did
pawn Код:
PlayerInfo[playerid][pSex] = 2;
                    ShowPlayerDialog(playerid, 5014,DIALOG_STYLE_INPUT,"Ah","So you are a female.Well how old are you?","Select","Cancel");
                }
            }
        }
        if(dialogid == 5014)
        {
            if(response)
            {
                PlayerInfo[playerid][pAge] = age;
So will this work?


Respuesta: Will this work? - Xabi - 21.03.2013

Asuming that this is just a fragment or code and that brackets are well closed and all that, you should make a little change, as "age" variable doesn't seem to be declared:

pawn Код:
PlayerInfo[playerid][pSex] = 2;
                    ShowPlayerDialog(playerid, 5014,DIALOG_STYLE_INPUT,"Ah","So you are a female.Well how old are you?","Select","Cancel");
                }
            }
        }
        if(dialogid == 5014)
        {
            if(response)
            {
                PlayerInfo[playerid][pAge] = strval(inputtext);



Re: Will this work? - Don_Cage - 21.03.2013

yea its all closed etc, ups i forgot that thanks for reminding me, but do i just do
pawn Код:
new age;
PlayerInfo[playerid][pAge] = age;
or do i have to do
pawn Код:
new age = strval(inputtext);
PlayerInfo[playerid][pAge] = age;



Re: Will this work? - Misiur - 21.03.2013

Think. In first case you don't assign anything to age variable, so pAge will be empty (0 by default) as well.