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

(Sry for bad English )
I have problem with compiling,
it is the error "array sizes Thurs comes not match, or destination array is too small"

Код:
public opfa(playerid)
{
  new bString[256];
 	if(OpenINI("Haus.cfg"))
 	{
 	  for(new i=0;i<MAX_HOUSES;i++)
 		{
			if(IsPlayerInRangeOfPoint(playerid,5.0,HausInfo[i][eX],HausInfo[i][eY],HausInfo[i][eZ]))
			{
		 		format(bString, 64, "Vergeben%d", i);
			  	HausInfo[i][Vergeben] = ReadIntKey(bString);
				if(HausInfo[i][Vergeben] == 1)
				{
    			format(bString, 64, "Preis%d", i);
				 	HausInfo[i][Preis] = ReadIntKey(bString);
				 	format(bString, 64, "Besitzer%s", i);
				  	HausInfo[i][Besitzer] = ReadStringKey(bString);
					format(bString,sizeof(bString),"~g~Haus Informationen~n~~w~\nMietkosten: %d ~y~\nBesitzer: %s ~b~",HausInfo[i][Preis],HausInfo[i][Besitzer]);
					GameTextForPlayer(playerid,bString,2500,3);
				}
  			else
				{
    			format(bString, 64, "Preis%d", i);
				 	HausInfo[i][Preis] = ReadIntKey(bString);
		 		 	format(bString,sizeof(bString),"~g~Haus Informationen~n~~w~\nHaus PreiЯ: %d ~y~\nBesitzer: Staat ~b~",HausInfo[i][Preis]);
					GameTextForPlayer(playerid,bString,2500,3);
  			}
			}
		}
		CloseINI();
	}
	return 1;
}
I've been trying new bString to 128 and 512 set but it does not works
Thx
Reply
#2

try setting bstring to 64
Reply
#3

not working
Reply
#4

nothing ideas?
Reply
#5

Код:
public opfa(playerid)
{
  new bString[128];
 	if(OpenINI("Haus.cfg"))
 	{
 	  for(new i=0;i<MAX_HOUSES;i++)
 		{
			if(IsPlayerInRangeOfPoint(playerid,5.0,HausInfo[i][eX],HausInfo[i][eY],HausInfo[i][eZ]))
			{
		 		format(bString, 128, "Vergeben%d", i);
			  	HausInfo[i][Vergeben] = ReadIntKey(bString);
				if(HausInfo[i][Vergeben] == 1)
				{
    			format(bString, 128, "Preis%d", i);
				 	HausInfo[i][Preis] = ReadIntKey(bString);
				 	format(bString, 128, "Besitzer%s", i);
				  	HausInfo[i][Besitzer] = ReadStringKey(bString);
					format(bString,sizeof(bString),"~g~Haus Informationen~n~~w~\nMietkosten: %d ~y~\nBesitzer: %s ~b~",HausInfo[i][Preis],HausInfo[i][Besitzer]);
					GameTextForPlayer(playerid,bString,2500,3);
				}
  			else
				{
    			format(bString, 128, "Preis%d", i);
				 	HausInfo[i][Preis] = ReadIntKey(bString);
		 		 	format(bString,sizeof(bString),"~g~Haus Informationen~n~~w~\nHaus PreiЯ: %d ~y~\nBesitzer: Staat ~b~",HausInfo[i][Preis]);
					GameTextForPlayer(playerid,bString,2500,3);
  			}
			}
		}
		CloseINI();
	}
	return 1;
}
whats the point in bstring anyways just use string

did that work?
Reply
#6

You have to use the same size sting in both places. Kar's might work.
Reply
#7

yes i changed all the 64's to 128

and btw dont use 256 and 512 are you crazy those will load up your gm and make it take longer to compile
Reply
#8

Quote:
Originally Posted by Kar
yes i changed all the 64's to 128

and btw dont use 256 and 512 are you crazy those will load up your gm and make it take longer to compile
Isn't 256 the max number of characters you can have?
Reply
#9

i bet its in this function "ReadIntKey(bString);"
the arays in there will need to be changed too :P
Reply
#10

Quote:
Originally Posted by NiiRV4N4
Quote:
Originally Posted by Kar
yes i changed all the 64's to 128

and btw dont use 256 and 512 are you crazy those will load up your gm and make it take longer to compile
Isn't 256 the max number of characters you can have?
yes but 128 loads faster. 256 shoudl only be used for err.. i forgot it should be used for something.. i cant remember but just use 128 lol.;p
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)