[fixed]Help using dini
#1

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
Reply
#2

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

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

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

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.
Reply
#6

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

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

It works, thank you
Reply
#9

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.
Reply
#10

I must be blind.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)