SA-MP Forums Archive
Wrong command - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Wrong command (/showthread.php?tid=261064)



Wrong command - Face9000 - 11.06.2011

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.


Re: Wrong command - Face9000 - 12.06.2011

bump.


Re: Wrong command - L84S - 12.06.2011

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



Re: Wrong command - Bmxerlmao5288 - 12.06.2011

Okay On the Line

Quote:

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

There Must be a ; at the end


Re: Wrong command - Stigg - 12.06.2011

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



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


Re: Wrong command - Bmxerlmao5288 - 12.06.2011

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


Re: Wrong command - Stigg - 12.06.2011

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);



Re: Wrong command - L84S - 12.06.2011

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


Re: Wrong command - Face9000 - 12.06.2011

warning 215: expression has no effect

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