Help with my code - 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: Help with my code (
/showthread.php?tid=214110)
Help with my code -
Amator - 20.01.2011
Hey my code gives me errors but I don't know why and how to fix it:
Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/aup", cmdtext, true, 10) == 0)
{
if(IsPlayerInRangeOfPoint(playerid, 7.0, 949.50, -1468.24, 17.39))
( // line 119
MoveObject(elevator1, 950.55139160156, -1468.2270507813, 16.267026901245, 2.00);
MoveObject(elevator2, 949.18682861328, -1468.2270507813, 16.267026901245, 2.00);
MoveObject(elevator3, 947.82708740234, -1468.2270507813, 16.267026901245, 2.00);
return 1;
}
return 0;
}
These errors:
Код:
C:\...(119 -- 120) : error 001: expected token: ")", but found ";"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
1 Error.
Thanks for your help
Re: Help with my code -
WillyP - 20.01.2011
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/aup", cmdtext, true, 10) == 0)
{
if(IsPlayerInRangeOfPoint(playerid, 7.0, 949.50, -1468.24, 17.39))
{
MoveObject(elevator1, 950.55139160156, -1468.2270507813, 16.267026901245, 2.00);
MoveObject(elevator2, 949.18682861328, -1468.2270507813, 16.267026901245, 2.00);
MoveObject(elevator3, 947.82708740234, -1468.2270507813, 16.267026901245, 2.00);
}
return 1;
}
return 0;
}
Re: Help with my code -
Amator - 20.01.2011
lol thank you so much
Respuesta: Help with my code -
[M]xFire - 20.01.2011
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/aup", cmdtext, true, 10) == 0)
{
if(IsPlayerInRangeOfPoint(playerid, 7.0, 949.50, -1468.24, 17.39))
{ //here
MoveObject(elevator1, 950.55139160156, -1468.2270507813, 16.267026901245, 2.00);
MoveObject(elevator2, 949.18682861328, -1468.2270507813, 16.267026901245, 2.00);
MoveObject(elevator3, 947.82708740234, -1468.2270507813, 16.267026901245, 2.00);
return 1;
}
return 0;
}
You put a '(' instead '{'
Re: Respuesta: Help with my code -
DVDK - 20.01.2011
Quote:
Originally Posted by [M]xFire
You put a '(' instead '{'
|
And he forgot the } above return 1;