18.03.2012, 04:30
I have problem with IsNumeric and Gender Problem
i follow SuperS82's tutorial called "Using OnPlayerText to make Questions"
it works fine until i get error from here
Error
and how to check if the in put in this code
was a alphabetical letter. i tired
but i get this error
i follow SuperS82's tutorial called "Using OnPlayerText to make Questions"
it works fine until i get error from here
pawn Код:
if((strcmp("male", tmp, true, strlen(tmp)) == 0) && (strlen(tmp) == strlen("male")))
Код:
error 017: undefined symbol "tmp"
pawn Код:
if(pInfo[playerid][TutStep] == 1)
{
if(!strlen(text))
{
SendClientMessage(playerid, COLOR_RED, "What is your Age?");
SendClientMessage(playerid, COLOR_WHITE, "HINT: Allowed age 10 to 35");
return 0;
}
if(strlen(text) != 2)
{
SendClientMessage(playerid, COLOR_RED,"2 Characters Digit only!!!");
return 0;
}
format(string, sizeof(string), "Ok, so you are %d years old", strval(text));
SendClientMessage(playerid, COLOR_YELLOW, string);
dini_IntSet(file, "Age", strval(text));
for(new i = 0; i < 100; i++)
SendClientMessageToAll(COLOR_WHITE," ");
SendClientMessage(playerid, COLOR_RED, "What is your Gender?");
SendClientMessage(playerid, COLOR_WHITE, "HINT: Allowed Gender: male and female");
pInfo[playerid][TutStep] = 2;
return 0;
}
pawn Код:
if(!IsNumeric(strlen(text)))
Код:
error 035: argument type mismatch (argument 1)