SA-MP Forums Archive
[HELP] Errors - 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: [HELP] Errors (/showthread.php?tid=199385)



[HELP] Errors - Pooh7 - 15.12.2010

How to fix this errors:

Command:
pawn Код:
if(strcmp(cmd, "/zakljucajserver", true) == 0)
    {
        if(PlayerInfo[playerid][pAdmin] >= 6 || IsPlayerAdmin(playerid))
        {
            if(ServerZakljucan == false)
            {
                tmp = strtok(cmdtext, idx);
                if(!strlen(tmp))
                {
                    SendClientMessage(playerid, COLOR_GRAD2, "Koristite: /zakljucajserver [Lozinka]");
                    return 1;
                }
                tmp = strtok(cmdtext, idx);
                ServerZakljucan = true;
------ERROR--->     LozinkaServera = tmp; <------------- ERROR LINE
                new pstr[64];
                format(pstr, sizeof pstr, "|NLG|: Server zakljucan! Lozinka: %s", LozinkaServera);
                SendClientMessage(playerid, COLOR_RED, pstr);
                SendAdminMessage(COLOR_ORANGE, "|NLG| Server zakljucan!");
// rest of cmd
Error:
Код:
error 006: must be assigned to an array



And:
Somewhere in OnDialogResponse:
pawn Код:
if(!strcmp(inputtext, LozinkaServera, false))
Код:
error 035: argument type mismatch (argument 2)
I have global variable "LozinkaServera" ://


Re: [HELP] Errors - blackwave - 15.12.2010

for the first:

pawn Код:
LozinkaServera = strval(tmp);
For the second I dont know. Simply hate strcmp =x;


Re: [HELP] Errors - Pooh7 - 15.12.2010

Thanks.
How to compare 2 strings without strcmp? O.o


Re: [HELP] Errors - Scenario - 15.12.2010

Your variable, LozinkaServera, is that a string?


Re: [HELP] Errors - Pooh7 - 15.12.2010

Hmm.. I don't know
It's command for server locking, server password is stored in LozinkaServera.