Errors occur when using latest Zeex compiler.
#1

Код:
C:\Users\Madars\Desktop\Motion-RP\gamemodes\motiongm.pwn(2966) : error 092: functions may not return arrays of unknown size (symbol "Convert")
C:\Users\Madars\Desktop\Motion-RP\gamemodes\motiongm.pwn(3372) : warning 213: tag mismatch
C:\Users\Madars\Desktop\Motion(ions may not return arrays of unknown size (symbol "Convert")
C:\Users\Madars\Desktop\Motion-RP\gamemodes\motiongm.pwn(4997) : error 092: functions may not return arrays of unknown size (symbol "Convert")
C:\Users\Madars\Desktop\Motion-RP\gamemodes\motiongm.pwn(7094) : error 092: functions may not return arrays of unknown size (symbol "Convert")
C:\Users\Madars\Desktop\Motion-RP\gamemodes\motiongm.pwn(7134) : error 092: functions may not return arrays of unknown size (symbol "Convert")
C:\Users\Madars\Desktop\Motion-RP\gamemodes\motiongm.pwn(7174) : error 092: functions may not return arrays of unknown size (symbol "Convert")
C:\Users\Madars\Desktop\Motion-RP\gamemodes\motiongm.pwn(12426) : error 092: functions may not return arrays of unknown size (symbol "Cof unknown size (symbol "Cof unknown size (symbol "Convert")
C:\Users\Madars\Desktop\Motion-RP\gamemodes\motiongm.pwn(22094) : error 092: functions may not return arrays of unknown size (symbol "Convert")
C:\Users\Madars\Desktop\Motion-RP\gamemodes\motiongm.pwn(23359) : error 092: functions may not return arrays of unknown size (symbol "Convert")
Pawn compiler 3.10.4	 	 	Copyright © 1997-2006, ITB CompuPhase


9 Errors.
These show up after I put in Zeex pawn patch v3.10.4. All the v3 versions give me this error. For now I'm using Zeex compiler from 2015.

Here's Convert function
Код:
stock Convert(seconds, stringTo[], size = sizeof(stringTo))
{
	stringTo[0] = 0x0;
	new result[4];
	result[0] = floatround(seconds / (3600 * 24));
	result[1] = floatround(seconds / 3600);
	result[2] = floatround((seconds / 60) - (result[1] * 60));
	result[3] = floatround(seconds - ((result[1] * 3600) + (result[2] * 60)));
	switch(result[0])
	{
		case 0:
		{
			switch(result[1])
			{
				case 0: format(stringTo,size,"%02d:%02d",result[2],result[3]);
				default: format(stringTo,size,"%d:%02d:%02d",result[1],result[2],result[3]);
			}
		}
	}
	return stringTo;
}
For example line 2966
Код:
for(new i = 0; i < sizeof(GZInfo); i++)
	{
		if(GZSafeTime[i] > 0)
		{
			GZSafeTime[i]--;
			foreach(new x: Player)
			{
				if(PI[x][pMember] == GZInfo[i][gNapad] || PI[x][pMember] == GZInfo[i][gFrak])
				{
					Convert(GZSafeTime[i], stringText); // line 2966
					PlayerTextDrawSetString(x, CaptureTD[x][2], stringText);
				}
			}
		}
	}
Really want to use Zeex compiler because of the speed improvement. GM takes a while to compile.
Reply
#2

What's the point of passing the array string by reference and at the same time return it? Use one way or another, not both.
Reply
#3

So I can just rename "return stringTo;" to "return 1;"?
Reply
#4

Yes, either return a value or don't return anything - it is not a mandatory thing.
Reply
#5

It worked, thanks! Just gotta check if Convert still works as intended. Love how fast it compiles now.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)