03.02.2012, 15:09
Quote:
It calculates the value of TEST_x (defined 100) plus 1 and then converts the whole thing to a string or something. However, I don't see any usefulness in this either. If Gamer_Z can provide me with a real world example to demonstrate its true usefulness (i.e. something that can't be done with the current preprocessor directives), I might come back on my opinion.
|
pawn Code:
#include <fdialog>
#adder MyFDialogIDBase 100
fDialog(MyFDialogIDBase+1)
{
if(!response)return 1;
ShowPlayerDialog(
playerid,
MyFDialogIDBase+2,
DIALOG_STYLE_INPUT,
"Registration",
"Please provide an password for your account:",
"Check",
"Abort"
);
return 1;
}
fDialog(MyFDialogIDBase+2)
{
if(!response)return 1;
new strlenv = strlen(inputtext);
if(strlenv > 90 || strlenv < 6)
{
ShowPlayerDialog(
playerid,
MyFDialogIDBase+2,
DIALOG_STYLE_INPUT,
"Registration",
"Your password should be between 6 and 90 characters long!",
"Check",
"Abort"
);
return 1;
}
format(AUTHREG[playerid][Password],90,"%s",inputtext);
ShowPlayerDialog(
playerid,
MyFDialogIDBase+3,
DIALOG_STYLE_INPUT,
"Registration",
"Please provide your E-Mail adres for password recovery:",
"Next",
"Abort"
);
return 1;
}
output:
pawn Code:
#include <fdialog>
fDialog(101)
{
if(!response)return 1;
ShowPlayerDialog(
playerid,
102,
DIALOG_STYLE_INPUT,
"Registration",
"Please provide an password for your account:",
"Check",
"Abort"
);
return 1;
}
fDialog(102)
{
if(!response)return 1;
new strlenv = strlen(inputtext);
if(strlenv > 90 || strlenv < 6)
{
ShowPlayerDialog(
playerid,
102,
DIALOG_STYLE_INPUT,
"Registration",
"Your password should be between 6 and 90 characters long!",
"Check",
"Abort"
);
return 1;
}
format(AUTHREG[playerid][Password],90,"%s",inputtext);
ShowPlayerDialog(
playerid,
103,
DIALOG_STYLE_INPUT,
"Registration",
"Please provide your E-Mail adres for password recovery:",
"Next",
"Abort"
);
return 1;
}