How do I check if a string Equals a certain word?
#6

Quote:
Originally Posted by [FU]Victious
Посмотреть сообщение
pawn Код:
COMMAND:gender(playerid,params[])
{
    if(!sscanf(params)) return SendClientMessage(playerid,-1,"You need to select a gender!");
    new strz[38];
    format(strz,sizeof(strz), "Your gender is now set to: %s.",params);
    SetPVarString(playerid,"Gender",params);
    SendClientMessage(playerid, blue, strz);
    return 1;
}
Hmm, By looking at that I'm guessing
if(!sscanf(params)) return SendClientMessage(playerid,-1,"You need to select a gender!");
Is checking if theres no value
Reply


Messages In This Thread
How do I check if a string Equals a certain word? - by ViperSniper - 19.01.2011, 17:09
Re: How do I check if a string Equals a certain word? - by Macluawn - 19.01.2011, 17:21
Re: How do I check if a string Equals a certain word? - by ViperSniper - 19.01.2011, 17:28
Re: How do I check if a string Equals a certain word? - by ViperSniper - 19.01.2011, 17:30
Re: How do I check if a string Equals a certain word? - by WillyP - 19.01.2011, 17:31
Re: How do I check if a string Equals a certain word? - by ViperSniper - 19.01.2011, 17:35

Forum Jump:


Users browsing this thread: 3 Guest(s)