Helpless with this error (Included line) - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Helpless with this error (Included line) (
/showthread.php?tid=79583)
Helpless with this error (Included line) -
TehNobody - 29.05.2009
Error:
redundant test: constant expression is non-zero
Line:
if (plyrps <= -29.1725,-57.2973,1003.5469)
plyrps is defined as GetPlayerPos..
Re: Helpless with this error (Included line) -
dice7 - 29.05.2009
pawn Код:
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
if ((x <= -29.1725) && (y <= -57.2973) && (z <=1003.5469))
{
//something here
}
Re: Helpless with this error (Included line) -
TehNobody - 29.05.2009
ty, no-more erros, now lets test teh cmd :>
It has to be in virtual world 6, ill post the whole command, cuz i dunn ohow to do
Код:
if (strcmp("/rob", cmdtext, true, 10) == 0)
{
new intr = GetPlayerInterior(playerid);
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
new rndm2 = random(10000);
new rndm = random(100);
{
if PlayerToPoint(playerid, 5, -29.1725,-57.2973,1003.5469) *then
if (rndm == 50)
GivePlayerMoney(playerid, rndm2); }
{
if ((x <= -29.1725) && (y <= -57.2973) && (z <=1003.5469))
{
SendClientMessage(playerid, 0xFF0000AA, "There is no cash register near you");
}
if ((x >= -29.1725) && (y >= -57.2973) && (z >=1003.5469))
{
SendClientMessage(playerid, 0xFF0000AA, "There is no cash register near you");
}
}
return 1;
}