Help with 2 errors
#3

Quote:
Originally Posted by XtremeR
Посмотреть сообщение
at the top of it write

new SLOTS;
Still having them

Код:
C:\Documents and Settings\User\Desktop\xx\xxx.pwn(825) : error 008: must be a constant expression; assumed zero
C:\Documents and Settings\User\Desktop\New Folder\xx\xxx.pwn(825) : error 009: invalid array size (negative, zero or out of bounds)
This is the part
Код:
forward UpdateSpeed(playerid);
enum SavePlayerPosEnum {
Float:LastX,
Float:LastY,
Float:LastZ
}

public UpdateSpeed(playerid)
{
	new Float:x,Float:y,Float:z;
	new Float:distance,value;
	for(new i=0; i<SLOTS; i++)
	{
		if(IsPlayerConnected(i))
		{
			GetPlayerPos(i, x, y, z);
			distance = floatsqroot(floatpower(floatabs(floatsub(x,SavePlayerPos[i][LastX])),2)+floatpower(floatabs(floatsub(y,SavePlayerPos[i][LastY])),2)+floatpower(floatabs(floatsub(z,SavePlayerPos[i][LastZ])),2));
    		// Distance: meters in the last second
			value = floatround(distance * 3600);
			if(UpdateSeconds > 1)
			{
				value = floatround(value / UpdateSeconds);
			}
			distance1[i] = floatround(value/1600);

			SavePlayerPos[i][LastX] = x;
			SavePlayerPos[i][LastY] = y;
			SavePlayerPos[i][LastZ] = z;
Reply


Messages In This Thread
Help with 2 errors - by Desi_Dude - 12.11.2012, 12:05
Re: Help with 2 errors - by XtremeR - 12.11.2012, 12:06
Re: Help with 2 errors - by Desi_Dude - 12.11.2012, 12:11
Re: Help with 2 errors - by Konstantinos - 12.11.2012, 12:11
Re: Help with 2 errors - by Desi_Dude - 12.11.2012, 12:16
Re: Help with 2 errors - by Konstantinos - 12.11.2012, 12:18
Re: Help with 2 errors - by Desi_Dude - 12.11.2012, 12:22
Re: Help with 2 errors - by Konstantinos - 12.11.2012, 12:25
Re: Help with 2 errors - by Desi_Dude - 12.11.2012, 12:31
Re: Help with 2 errors - by DamienWalter - 28.04.2013, 11:53

Forum Jump:


Users browsing this thread: 2 Guest(s)