error codes
#7

Quote:
Originally Posted by LetsOWN[PL]
Посмотреть сообщение
Where is defined glob0?
What's the prototype of functionB38() (in meaning: what are the formal arguments for it)?

Greetings.
Quote:
Originally Posted by LetsOWN[PL]
Посмотреть сообщение
So, this function can be executed for non-array arguments.
pawn Код:
functionB38(cmdtext, var1);
cmdtext in this case IS an array. Header of Your function should look like this:
pawn Код:
functionB38(arg0[], &arg1)
{
// ...
By the way, what this code is supposed to do?
The way I see it, is that it just returns part of string, starting at index of arg1 and ending in space (32) sign, and also assigns the value of variable sent via reference to number of characters returned by this command (length, string not it's size)

pawn Код:
new a = 0;
functionB38("abc def", a); // Must be 'a' because of reference. Isn't it pointless?
// returns: abc and 3 (assigned to a)
Isn't it better to use sscanf, which is obviously faster? But still, it's all up to You, whether way You'll choose

Greetings
I fix all erros only left 3 warnings
Код:
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
Код:
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


Messages In This Thread
error codes - by karolissas - 26.08.2015, 08:52
Re: error codes - by LetsOWN[PL] - 26.08.2015, 08:56
Re: error codes - by karolissas - 26.08.2015, 08:59
Re: error codes - by karolissas - 26.08.2015, 09:01
Re: error codes - by LetsOWN[PL] - 26.08.2015, 09:15
Re: error codes - by karolissas - 26.08.2015, 09:23
Re: error codes - by karolissas - 26.08.2015, 09:43
Re: error codes - by BKarner - 26.08.2015, 13:53

Forum Jump:


Users browsing this thread: 3 Guest(s)