PDA

View Full Version : Will this work?


Don_Cage
21/03/2013, 08:33 AM
Hello I need awnser from here since I dont want to disturb the other players if it dont work.. Anyway this is what I didPlayerInfo[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?

Xabi
21/03/2013, 09:02 AM
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:


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);

Don_Cage
21/03/2013, 10:13 AM
yea its all closed etc, ups i forgot that thanks for reminding me, but do i just do
new age;
PlayerInfo[playerid][pAge] = age;
or do i have to do new age = strval(inputtext);
PlayerInfo[playerid][pAge] = age;

Misiur
21/03/2013, 10:22 AM
Think. In first case you don't assign anything to age variable, so pAge will be empty (0 by default) as well.