Something wrong and i don't know what... Help plz - 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: Something wrong and i don't know what... Help plz (
/showthread.php?tid=239333)
Something wrong and i don't know what... Help plz -
ricardo178 - 13.03.2011
Hey guys... I am just trying to do something but not working!
This give me errors...
Код:
C:\Users\Ricardo\Desktop\Mini-DM\Mini-DM\Freedoom\filterscripts\copsystem.pwn(20) : error 036: empty statement
C:\Users\Ricardo\Desktop\Mini-DM\Mini-DM\Freedoom\filterscripts\copsystem.pwn(26) : warning 225: unreachable code
C:\Users\Ricardo\Desktop\Mini-DM\Mini-DM\Freedoom\filterscripts\copsystem.pwn(26) : error 029: invalid expression, assumed zero
C:\Users\Ricardo\Desktop\Mini-DM\Mini-DM\Freedoom\filterscripts\copsystem.pwn(26) : warning 215: expression has no effect
C:\Users\Ricardo\Desktop\Mini-DM\Mini-DM\Freedoom\filterscripts\copsystem.pwn(26) : error 001: expected token: ";", but found "return"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
3 Errors.
pawn Код:
COMMAND:duty(playerid, params[])
{
if(IsPlayerConnected(playerid))
{
if(IsPlayerInRangeOfPoint(playerid, 2.0, 1555.097900, -1675.848754, 16.195312));
{
SetPlayerColor(playerid, 0x0259EAAA);
SendClientMessage(playerid, 0x0259EAAA, "You Are Now A Cop, Use /equip To Get Weapons.");
return 1;
}
else return SendClientMessage(playerid, 0x0259EAAA, "You Are Not In LSPD Entrance.");
}
else return SendClientMessage(playerid, 0x0259EAAA, "Player Is Not Online");
}
THANKS
Re: Something wrong and i don't know what... Help plz -
Kwarde - 13.03.2011
pawn Код:
if(IsPlayerInRangeOfPoint(playerid, 2.0, 1555.097900, -1675.848754, 16.195312));
must be
pawn Код:
if(IsPlayerInRangeOfPoint(playerid, 2.0, 1555.097900, -1675.848754, 16.195312))
You had ';' after it (I don't know the English name)
** Getplayer pos and check if he's inrange
pawn Код:
new Float:pos[3];
GetPlayerPos(playerid, pos[0], pos[1], pos[2]); //Change 'playerid' for the target
if(IsPlayerInRangeOfPoint(playerid, RANGE, pos[0], pos[1], pos[2])){
//Script
}
else{
// Not in range
}
Re: Something wrong and i don't know what... Help plz -
ricardo178 - 13.03.2011
Thanks man!