SA-MP Forums Archive
2 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: 2 errors (/showthread.php?tid=173793)



2 errors - acade - 03.09.2010

(286) : error 035: argument type mismatch (argument 1)
(321) : error 035: argument type mismatch (argument 1)
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


2 Errors.

Lines:

pawn Код:
dini_IntSet(file, "Password", udb_hash(password));

if(strcmp(dini_Get(file, "Password"), udb_hash(password), true))



Re: 2 errors - Nekrus2 - 03.09.2010

argument 1 is wrong you need to change it (teling you what error says not how to fix it )


Re: 2 errors - acade - 03.09.2010

Yes I know, but that seems correct.


Re: 2 errors - Victor - 03.09.2010

Did you try dini_Set and dini_Get?


Re: 2 errors - LarzI - 03.09.2010

Show us the definition of "file"

[This forum requires that you wait 120 seconds between posts. Please try again in 29 seconds.]
vv stfu


Re: 2 errors - acade - 03.09.2010

format(file, sizeof(file), "%s.ini", PlayerName);
if(dini_Exists(file))

I'm guessing it may be something to do with the udb_hash?


Re: 2 errors - Flo_White - 03.09.2010

shouldn't this be something like format(file, sizeof(file), "%s.ini", PlayerName(playerid)); ?


Re: 2 errors - Voldemort - 03.09.2010

Why dont you not try to use original file system?


Re: 2 errors - Toni - 03.09.2010

Quote:
Originally Posted by acade
Посмотреть сообщение
format(file, sizeof(file), "%s.ini", PlayerName);
if(dini_Exists(file))

I'm guessing it may be something to do with the udb_hash?
If your PlayerName is a stock function or just a function in general, you need to use PlayerName(playerid).


Re: 2 errors - Vince - 03.09.2010

udb_hash returns an integer. So you're actually trying to compare a string with an integer, which obviously doesn't work.

This should work:
pawn Код:
if(udb_hash(password) == dini_Int(file, "Password"))
{
    // They are the same
}
else
{
    // They are NOT the same
}