error 047: array sizes do not match, or destination array is too small
#1

I'm working on Dynamic Factions script and i get this error
Код:
error 047: array sizes do not match, or destination array is too small
On this line
Код:
public LoadFactions()
{
    new string[128], otherstring[128];
    for(new i = 0; i < MAX_GROUPS; i++)
    {
    	format(string, sizeof(string),"Faction_%d",i);
		if(djIsSet(FACTIONS_FILE, string))
		{
			*/-*format(otherstring, sizeof(otherstring),"Faction_%d/FactionName",i); FactionInfo[i][fName] = dj(FACTIONS_FILE, otherstring);*-\*
Marked with */-* and *-\*
Help!
Reply
#2

I think making them 255 is a solution but it's not a good one!

... someone should post a better one ...
Reply
#3

THEM? You mean "string" and "otherstring" ?
Reply
#4

pawn Код:
FactionInfo[i][fName] = dj(FACTIONS_FILE, otherstring);
to
pawn Код:
format(FactionInfo[i][fName],sizeof(FactionInfo[i][fName]),"%s",dj(FACTIONS_FILE, otherstring));
Otherwise, they need to match PERFECT and that is not a good idea in this case with different owners.
Reply
#5

Quote:
Originally Posted by Jochemd
Посмотреть сообщение
Otherwise, they need to match PERFECT and that is not a good idea in this case with different owners.
What you mean by that? Should i do same on the rest of my script?

EDIT@@
it causes only 4 more errors
Код:
C:\DOCUME~1\Machlik\MOJEDO~1\POBIER~1\SAMP03~1\GAMEMO~1\IRPG2.pwn(689) : error 001: expected token: "]", but found "-identifier-"
C:\DOCUME~1\Machlik\MOJEDO~1\POBIER~1\SAMP03~1\GAMEMO~1\IRPG2.pwn(689) : warning 215: expression has no effect
C:\DOCUME~1\Machlik\MOJEDO~1\POBIER~1\SAMP03~1\GAMEMO~1\IRPG2.pwn(689) : error 001: expected token: ";", but found "]"
C:\DOCUME~1\Machlik\MOJEDO~1\POBIER~1\SAMP03~1\GAMEMO~1\IRPG2.pwn(689) : error 029: invalid expression, assumed zero
C:\DOCUME~1\Machlik\MOJEDO~1\POBIER~1\SAMP03~1\GAMEMO~1\IRPG2.pwn(689) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.
Reply
#6

BUMP!!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)