[SOLVED] dini!!! - 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: [SOLVED] dini!!! (
/showthread.php?tid=114911)
[SOLVED] dini!!! -
SiJ - 21.12.2009
Hey,
Here's my code:
pawn Код:
new pin[255]; // I tried changing this value to MAX_STRING, but I get same error...
if(CheckPlayerPIN(pName,pin) == 0) ErrorMsg(playerid,"Your PIN code is incorrect!"); //ERROR HERE
And CheckPlayerPIN(...):
pawn Код:
stock CheckPlayerPIN(Owner[],pin[])
{
if(!dini_Exists(Owner)) return -1;
new tmp[255];
tmp = dini_Get(Owner,"AccountPass");
if(!strcmp(tmp,pin,true)) return 1;
return 0;
}
error 048: array dimensions do not match
Re: [HELP] dini!!! -
LarzI - 21.12.2009
Change
to
Change
to
Then lastly change
pawn Код:
tmp = dini_Get(Owner,"AccountPass");
to
pawn Код:
format(tmp, sizeof(tmp), "%s", dini_Get(Owner,"AccountPass"));
The last is not necaserry, only if you still get errors.
Re: [HELP] dini!!! -
SiJ - 21.12.2009
Quote:
Originally Posted by lrZ^ aka LarzI
Change to
Change to
Then lastly change
pawn Код:
tmp = dini_Get(Owner,"AccountPass");
to
pawn Код:
format(tmp, sizeof(tmp), "%s", dini_Get(Owner,"AccountPass"));
The last is not necaserry, only if you still get errors.
|
Oops... I just noticed that the error was with pName... cause I use it as global variable and the right array is pName[playerid]...
Thanks for reply and sorry for my stupidity..
Re: [SOLVED] dini!!! -
LarzI - 21.12.2009
Lol, giant failure by me x)
Good thing you did solve it though