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

Код:
new File:f, templine[256], TBuilder[MAX_PLAYER_NAME], TempLapper[MAX_PLAYER_NAME], TempLap;
			idx=0;
			f = fopen(temprace, io_read);
			fread(f,templine,sizeof(templine));
			if(templine[0] == 'Y')
			{
				new fileversion;
			    strtok(templine,idx);
				fileversion = strval(strtok(templine,idx));
				if(fileversion > VERSION)
				{
				    format(stringagara,sizeof(stringagara),"Race \'%s\' is created with a newer version of YRACE, unable to load.",tmp);
				    SendClientMessage(playerid,RED,stringagara);
				    return 1;
				}
				TBuilder=strtok(templine,idx); <------ERROR LINE!!!!
I've tried to change templine[256] in templine[512] or templine[128], nothing change, same errors.
Thanks for the help!
Reply
#2

Код:
new File:f, templine[256], TBuilder[MAX_PLAYER_NAME], TempLapper[MAX_PLAYER_NAME], TempLap;
			idx=0;
			f = fopen(temprace, io_read);
			fread(f,templine,sizeof(templine));
			if(templine[0] == 'Y')
			{
				new fileversion;
				fileversion = strval(strtok(templine,idx));
				if(fileversion > VERSION)
				{
				    format(stringagara,sizeof(stringagara),"Race \'%s\' is created with a newer version of YRACE, unable to load.",tmp);
				    SendClientMessage(playerid,RED,stringagara);
				    return 1;
				}
				TBuilder=strtok(templine,idx);
Reply
#3

Nothing change! Same error! In the same line!
Код:
TBuilder=strtok(templine,idx);
Reply
#4

Nobody knows how to solve?
Reply
#5

Код:
format(Tbuilder,sizeof(Tbuilder),"%s",strtok(templine,idx));
Reply
#6

Finally! It works! Thanks thanks!!!
Reply


Forum Jump:


Users browsing this thread: