SA-MP Forums Archive
Invalid expression help - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Invalid expression help (/showthread.php?tid=444939)



Invalid expression help - GTAIVCode3 - 19.06.2013

PHP код:
Copy.pwn(4968) : error 029invalid expressionassumed zero
Copy
.pwn(4968) : error 029invalid expressionassumed zero
Copy
.pwn(4968) : warning 221label name "Float" shadows tag name
Copy
.pwn(4968) : error 029invalid expressionassumed zero
Copy
.pwn(4968) : fatal error 107too many error messages on one line 
Код:
public PlayerToPoint(Float:range, playerid, Float:x, Float:y, Float:z)

    if(IsPlayerConnected(playerid) )
	{
		new Float:oldposx, Float:oldposy, Float:oldposz;
		new Float:tempposx, Float:tempposy, Float:tempposz;
		GetPlayerPos(playerid, oldposx, oldposy, oldposz);
		tempposx = (oldposx -x);
		tempposy = (oldposy -y);
		tempposz = (oldposz -z);
		if (((tempposx < range) && (tempposx > -range)) && ((tempposy < range) && (tempposy > -range)) && ((tempposz < range) && (tempposz > -range)))
	    return 1;
}



Re: Invalid expression help - jakejohnsonusa - 19.06.2013

What line is 4968 in your code?


Re: Invalid expression help - GTAIVCode3 - 19.06.2013

Quote:
Originally Posted by jakejohnsonusa
Посмотреть сообщение
What line is 4968 in your code?
public PlayerToPoint(Float:range, playerid, Float, Float:y, Float:z)


Re: Invalid expression help - OpticKiller - 19.06.2013

try it might work dante said you needed help
Код:
public PlayerToPoint(Float:range, playerid, Float:x, Float:y, Float:z)
{

    if(IsPlayerConnected(playerid) )
    {
	new Float:oldposx, Float:oldposy, Float:oldposz;
	new Float:tempposx, Float:tempposy, Float:tempposz;
	GetPlayerPos(playerid, oldposx, oldposy, oldposz);
	tempposx = (oldposx -x);
	tempposy = (oldposy -y);
	tempposz = (oldposz -z);
	if (((tempposx < range) && (tempposx > -range)) && ((tempposy < range) && (tempposy > -range)) && ((tempposz < range) && (tempposz > -range)))
    }	
    return 1;
}



Re: Invalid expression help - GTAIVCode3 - 19.06.2013

Quote:
Originally Posted by OpticKiller
Посмотреть сообщение
try it might work dante said you needed help
Код:
public PlayerToPoint(Float:range, playerid, Float:x, Float:y, Float:z)
{

    if(IsPlayerConnected(playerid) )
    {
	new Float:oldposx, Float:oldposy, Float:oldposz;
	new Float:tempposx, Float:tempposy, Float:tempposz;
	GetPlayerPos(playerid, oldposx, oldposy, oldposz);
	tempposx = (oldposx -x);
	tempposy = (oldposy -y);
	tempposz = (oldposz -z);
	if (((tempposx < range) && (tempposx > -range)) && ((tempposy < range) && (tempposy > -range)) && ((tempposz < range) && (tempposz > -range)))
    }	
    return 1;
}
Did nothing. Same errors


Re: Invalid expression help - jakejohnsonusa - 19.06.2013

Did you remember to forward it?

If so, can you post the forward.