09.07.2011, 17:10
Hello,
I want to know what the player's gender is.
The way I do this is by Dialog.
Now, the problem is that I can't check if the inputtext is Male or Female.
My code:
And the error I get is:
Thanks in advance!
I want to know what the player's gender is.
The way I do this is by Dialog.
Now, the problem is that I can't check if the inputtext is Male or Female.
My code:
pawn Code:
if(dialogid == 8)
{
if(response)
{
if(inputtext == "Male" || inputtext == "male") // Line 955
{
SendClientMessage(playerid, COLOR_GREEN, "So you are a Male.");
gPlayerInfo[playerid][pSex] = 1;
}
else if(inputtext == "Female" || inputtext == "female") // Line 960
{
SendClientMessage(playerid, COLOR_GREEN, "So you are a Female.");
gPlayerInfo[playerid][pSex] = 2;
}
else
{
SendClientMessage(playerid, COLOR_RED, "You need to choose between Male or Female!");
ShowPlayerDialog(playerid, 8, DIALOG_STYLE_INPUT, "Sex", "What gender are you?\n\nMale / Female", "Ok", "Cancel");
}
}
else
{
SendClientMessage(playerid, COLOR_RED, "You need to fill in what your gender is!");
ShowPlayerDialog(playerid, 8, DIALOG_STYLE_INPUT, "Sex", "What gender are you?\n\nMale / Female", "Ok", "Cancel");
}
}
pawn Code:
D:\GTASAN~1\server\GAMEMO~1\RRP.pwn(955) : error 001: expected token: "-string end-", but found "-identifier-"
D:\GTASAN~1\server\GAMEMO~1\RRP.pwn(960) : error 001: expected token: "-string end-", but found "-identifier-"
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase