Weird Problem
#1

I followed this adminscript tutorial,
And if i type /register [password] ingame,
Ofcourse i replace [password] with my actual password,
But it says this ingame:

ERROR: Password must be between 0 and $d characters long!

The line that triggers that is:
pawn Код:
new string[200];
format(string, sizeof(string), "ERROR: Password must be between %d and $d characters long!", gSettings[PASS_MIN], gSettings[PASS_MAX]);
return SendClientMessage(playerid, COLOUR_ORANGE, string);
And uses:

pawn Код:
else if(strlen(params) < gSettings[PASS_MIN] || strlen(params) > gSettings[PASS_MAX])
I cant find anything else, Well i can, But nowhere to see the limit and/or to change it

EDIT: It says between 0 and $d should i change that to %d or leave it

Reply
#2

pawn Код:
Change this:
format(string, sizeof(string), "ERROR: Password must be between %d and $d characters long!", gSettings[PASS_MIN], gSettings[PASS_MAX]);

to this:
format(string, sizeof(string), "ERROR: Password must be between %d and %d characters long!", gSettings[PASS_MIN], gSettings[PASS_MAX]);
He has already answered,sorry ;p
Reply
#3

pawn Код:
format(string, sizeof(string), "ERROR: Password must be between %d and $d characters long!",
to
pawn Код:
format(string, sizeof(string), "ERROR: Password must be between %d and %d characters long!",
Reply
#4

Ok now ingame its showing

Between 0 and $d characters
Reply
#5

Change $ to % .
Reply
#6

I have..

Ingame it says

Between 0 and $d Characters long
Reply
#7

Quote:
Originally Posted by Torran
I have..
Are you sure?
Reply
#8

Quote:
Originally Posted by MadeMan
Quote:
Originally Posted by Torran
I have..
Are you sure?
Yes

EDIT: Oh wait i just did it on password and not on register

EDIT: How do i change the Max characters,
Because ingame it just says Between 0 and 0
Reply
#9

Find the place where you have

pawn Код:
new gSettings
Reply
#10

Quote:
Originally Posted by MadeMan
Find the place where you have

pawn Код:
new gSettings
pawn Код:
new gSettings[SETTINGS_MAIN];
pawn Код:
gSettings[PASS_MIN]             = dini_Int(SettingFile, "PassMin");
    gSettings[PASS_MAX]             = dini_Int(SettingFile, "PassMax");
pawn Код:
else if(strlen(params) < gSettings[PASS_MIN] || strlen(params) > gSettings[PASS_MAX])
pawn Код:
else if(strlen(tmp2) < gSettings[PASS_MIN] || strlen(tmp2) > gSettings[PASS_MAX])
All gSettings i can find related to that
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)