Name Lengh Problem!
#1

FIXED!
Reply
#2

Ok and the code? Do we guess that again?
Reply
#3

Too small buffer, too small field in database, or username search using "like" instead of exact search. There are tons of possibilities. You need to debug your code, drop some print statements around and check where the problem is.
Reply
#4

FIXED!
Reply
#5

Well lets start.

1. Your "Loginstring" has to much of a high variable.

Change new loginstring[500]; to new loginstring[128];

2. Same story for Loginname.

Change new loginname[100]; to new loginname[64]; (64 is fine for any normal name.)

Hope this helped you
Reply
#6

In fact, use MAX_PLAYER_NAME + 1 for loginname.

Now, first of all, when you are using string without any parameters inside, then don't use format.

pawn Код:
if (gPlayerAccount[playerid] != 0)
{
    new
        loginstring[128],
        loginname[MAX_PLAYER_NAME + 1];

    GetPlayerName(playerid,loginname,sizeof(loginname));
    TextDrawShowForPlayer(playerid, TextdrawConnect2);
    TextDrawShowForPlayer(playerid, TextdrawConnect3);
    format(loginstring,sizeof(loginstring),"{FFFFFF}Salut, {2F991A}%s {FFFFFF}Ai deja un cont pe Comunitatea Union-Zone!",loginname);
    SendClientMessage(playerid, COLOR_WHITE, loginstring);
    ShowPlayerDialog(playerid,12346,DIALOG_STYLE_PASSWORD,"Login","Acest cont este inregistrat.Te poti loga!","Login","Exit");
}
And the problem is somewhere else, not here.
Reply
#7

BUMP SORRY
Reply
#8

FIXED!
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)