Tag mismatch returning arrays
#1

Hi everyone

Trying to do a crossproduct with 2 vectors:

Code:
crossproduct(Float:x[], Float:y[]) //vectors 3x1
{
    new Float:h[3];
	h[0] = x[1] * y[2] - x[2] * y[1];
	h[1] = -(x[0] * y[2] - x[2] * y[0]);
	h[2] = x[0] * y[1] - y[0] * x[1];
    return _:h;
}
Under OnGameModeInit
Code:
new
	Float:x[3] = { 1.0, 2.0, 3.0 },
	Float:y[3] = { 4.0, 5.0, 6.0 },
	Float:h[3];

	h = crossproduct(x, y);
	printf("test: %f, %f, %f", h[0], h[1], h[2]);
It prints properly, however my compiler gives the following warning:
warning 213: tag mismatch for the line: h = crossproduct(x, y);

Any help?
Reply


Messages In This Thread
Tag mismatch returning arrays - by Baboon - 02.01.2019, 19:33
Re: Tag mismatch returning arrays - by Kar - 02.01.2019, 19:37
Re: Tag mismatch returning arrays - by Baboon - 02.01.2019, 19:47

Forum Jump:


Users browsing this thread: 1 Guest(s)