SA-MP Forums Archive
[fixed]Help using 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: [fixed]Help using dini (/showthread.php?tid=85109)



[fixed]Help using dini - dice7 - 05.07.2009

Im using seifs administration script and since It's auto login is bugged, I decided to make my own one. I have this when the player registers
pawn Код:
new string[50];
format(string, sizeof(string), "/sAccounts/%s.seifadmin", name);
dini_Set(string, "ip",ip);
And this under OnPlayerConnect
pawn Код:
new playerIP[16], path[22+MAX_PLAYER_NAME], name[MAX_PLAYER_NAME], fileip[16];
        GetPlayerIp(playerid, playerIP, sizeof(playerIP));
        GetPlayerName(playerid, name, sizeof(name));
        format(path, sizeof(path), "/sAccounts/%s.seifadmin", name);
/*695*/ fileip = dini_Get(path, "ip");
        if (strcmp(playerIP, fileip, false)== 0)
        {
          SendClientMessage(playerid, YELLOW, "|- Auto Login -|");
But I get this error
Код:
C:\Documents and Settings\Tadej\Desktop\samp server\samp02Xserver.win32\filterscripts\SeifAdmin.pwn(695) : error 047: array sizes do not match, or destination array is too small
Help


Re: Help using dini - refshal - 05.07.2009

What line is "695"?
And if it's a problem with Seif's Admin Script, then ask in the script's thread.


Re: Help using dini - dice7 - 05.07.2009

Is it hard to take 5 seconds from your life away and properly read my post ?


Re: Help using dini - refshal - 05.07.2009

1. Problems with edited scripts belongs in the source script's thread.
2. You still didn't tell me what line "695" is.


Re: Help using dini - woot - 05.07.2009

Quote:
Originally Posted by cοοp
1. Problems with edited scripts belongs in the source script's thread.
2. You still didn't tell me what line "695" is.
Try re-reading the first post, read before posting, troll.


Re: Help using dini - Jefff - 05.07.2009

dini_Get returns MAX_STRING so 255, change
Код:
fileip[16]
to
Код:
fileip[255]



Re: Help using dini - refshal - 05.07.2009

I didn't know what line "695" was. How the hell was I supposed to know that? ~_~


Re: Help using dini - dice7 - 05.07.2009

It works, thank you


Re: Help using dini - Correlli - 05.07.2009

Quote:
Originally Posted by cοοp
1. Problems with edited scripts belongs in the source script's thread.
2. You still didn't tell me what line "695" is.
pawn Код:
/*695*/ fileip = dini_Get(path, "ip");
You can see it in first post.

Anyway:
Quote:

Error 047: Array sizes do not match, or destination array is too small:
For array assignment, the arrays on the left and the right side of the
assignment operator must have the same number of dimensions.
In addition:
⋄ for multi-dimensional arrays, both arrays must have the same size;
⋄ for single arrays with a single dimension, the array on the left side of the assignment operator must have a size that
is equal or bigger than the one on the right side.
When passing arrays to a function argument, these rules also hold for the array that is passed to the function (in the
function call) versus the array declared in the function definition.
When a function returns an array, all return statements must specify an array with the same size and dimensions.

Edit:
Quote:
Originally Posted by Jefff
dini_Get returns MAX_STRING so 255, change
Код:
fileip[16]
to
Код:
fileip[255]
You don't need 255, it's too big.


Re: Help using dini - refshal - 05.07.2009

I must be blind.