Help fix warnings
#1

Code:
C:\Users\Core i5\Desktop\GRP4 EDITED\gamemodes\grandlarc.pwn(2427) : warning 213: tag mismatch
C:\Users\Core i5\Desktop\GRP4 EDITED\gamemodes\grandlarc.pwn(2428) : warning 213: tag mismatch
C:\Users\Core i5\Desktop\GRP4 EDITED\gamemodes\grandlarc.pwn(2429) : warning 213: tag mismatch
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


3 Warnings.
lines
Code:
function360(Float:arg0, Float:arg1, Float:arg2, Float:arg3)
{
	for(new var0 = 0; var0 < 200; var0++)
	{
		if(!glob0[var0][0])
		{
			glob0[var0][0] = 1;
	2427 -->    glob0[var0][1] = arg0;
	2428-->	glob0[var0][2] = arg1;
	2429-->		glob0[var0][3] = arg2 - 0.6999;
			glob0[var0][4] = CreateObject(2899, arg0, arg1, arg2 - 0.8999, 0.0, 0.0, arg3 - 90, 0);
			return 1;
		}
	}
	return 0;
}
Reply
#2

Use:
strval(arg0);
strval(arg1);
strval(arg2) - bla bla bla
Reply
#3

Please show like code should look
Reply
#4

Code:
function360(Float:arg0, Float:arg1, Float:arg2, Float:arg3)
{
	for(new var0 = 0; var0 < 200; var0++)
	{
		if(!glob0[var0][0])
		{
			glob0[var0][0] = 1;
	2427 -->    glob0[var0][1] = strval(arg0);
	2428-->	glob0[var0][2] = strval(arg1);
	2429-->		glob0[var0][3] = strval(arg2) - 0.6999;
			glob0[var0][4] = CreateObject(2899, arg0, arg1, arg2 - 0.8999, 0.0, 0.0, arg3 - 90, 0);
			return 1;
		}
	}
	return 0;
}
^^ According to the other reply. Although, I'd personally do this. (Assuming you dont want to use sscanf).

Code:
function360(Float:arg0, Float:arg1, Float:arg2, Float:arg3)
{
        arg0 = strval(arg0); arg1 = strval(arg1); arg2 = strval(arg2); arg3 = strval(arg3);
	for(new var0 = 0; var0 < 200; var0++)
	{
		if(!glob0[var0][0])
		{
			glob0[var0][0] = 1;
	2427 -->    glob0[var0][1] = arg0;
	2428-->	glob0[var0][2] = arg1;
	2429-->		glob0[var0][3] = arg2 - 0.6999;
			glob0[var0][4] = CreateObject(2899, arg0, arg1, arg2 - 0.8999, 0.0, 0.0, arg3 - 90, 0);
			return 1;
		}
	}
	return 0;
}
Another reason could be because of your glob0enum. It may not have 0,1,2,3 as float: variables.
Reply
#5

Using a decompiled script ... *sigh*. Stop stealing. Or make backups.
Reply
#6

Quote:
Originally Posted by Vince
View Post
Using a decompiled script ... *sigh*. Stop stealing. Or make backups.
I didn't even think about that. I feel cheated.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)