Wrong command
#1

Hi guys i've this cmd to change password on the server:

pawn Код:
if(strcmp(cmd, "/changepass", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            if(logged[playerid] == 0)
            {
                SendClientMessage(playerid, COLOR_RED, "You need to login before changing password.");
                return 1;
            }
            tmp = strtok(cmdtext, idx);
            if(!strlen(tmp))
            {
                SendClientMessage(playerid, COLOR_YELLOW, "Correct Usage: /changepass[password]");
                return 1;
            }
            dini_Get(udb_encode(playername), "Password");, tmp, 0, strlen(cmdtext), 255);
            OnPlayerUpdate(playerid);
           
            SendClientMessage(playerid, COLOR_YELLOW, "Password has been changed successfuly");
        }
        return 1;
    }
But it return me errors:

Код:
error 029: invalid expression, assumed zero
warning 215: expression has no effect
warning 215: expression has no effect
warning 215: expression has no effect
error 001: expected token: ";", but found ")"
error 029: invalid expression, assumed zero
fatal error 107: too many error messages on one line
Thanks.
Reply
#2

bump.
Reply
#3

Код:
 dini_Get(udb_encode(playername), "Password") , tmp, 0, strlen(cmdtext), 255);
Reply
#4

Okay On the Line

Quote:

SendClientMessage(playerid, COLOR_RED, "You need to login before changing password.");

There Must be a ; at the end
Reply
#5

Quote:
Originally Posted by Bmxerlmao5288
Посмотреть сообщение
Okay On the Line



There Must be a ; at the end
Which there already is.
Reply
#6

On The Error Line
Код:
error 001: expected token: ";", but found ")"
Can You Post The Script Line Please?
Reply
#7

The ';' should not be in the middle of this line:
pawn Код:
dini_Get(udb_encode(playername), "Password");, tmp, 0, strlen(cmdtext), 255);
Try:
pawn Код:
dini_Get(udb_encode(playername), "Password"), tmp, 0, strlen(cmdtext), 255);
Reply
#8

I had become in the previous post.
Sry for my bad english.
Reply
#9

warning 215: expression has no effect

pawn Код:
dini_Get(udb_encode(playername), "Password") , tmp, 0, strlen(cmdtext), 255);
Thanks....
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)