[PROBLEM] CMD - 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: [PROBLEM] CMD (
/showthread.php?tid=350118)
[PROBLEM] CMD -
N0FeaR - 11.06.2012
I get this
Код:
../gamemodes/OnPlayerCommandZCMD.pwn(3599) : error 010: invalid function or declaration
../gamemodes/OnPlayerCommandZCMD.pwn(3603) : error 010: invalid function or declaration
pawn Код:
}
CMD:sup(playerid, params[])
{
if(GetPlayerState(playerid) == 1)
{
if(PlayerToPoint(5.0,playerid,242.7591,66.4315,1003.6406))
{
SetPlayerPos(playerid, 619.0756,-566.6477,26.1432);
GameTextForPlayer(playerid, "~b~Sheriff Roof",5000,1);
SetPlayerInterior(playerid,0);
SetPlayerVirtualWorld(playerid,0);
}
}
}
else
{
SendClientMessage(playerid, COLOR_LIGHTRED, "WARNING: You do not have access to this command.");
}
return 1;
}
AW: [PROBLEM] CMD -
Extremo - 11.06.2012
Point out the lines please? Where exactly is: 3599 and where is: 3603
Re: [PROBLEM] CMD -
Black Axe - 11.06.2012
Which lines have the errors ?
Edit : too late.
Re: [PROBLEM] CMD -
zombieking - 11.06.2012
pawn Код:
CMD:sup(playerid, params[])
{
if(GetPlayerState(playerid) == 1)
{
if(PlayerToPoint(5.0,playerid,242.7591,66.4315,1003.6406))
{
SetPlayerPos(playerid, 619.0756,-566.6477,26.1432);
GameTextForPlayer(playerid, "~b~Sheriff Roof",5000,1);
SetPlayerInterior(playerid,0);
SetPlayerVirtualWorld(playerid,0);
}
}
else
{
SendClientMessage(playerid, COLOR_LIGHTRED, "WARNING: You do not have access to this command.");
}
return 1;
}
Try this.
Re: [PROBLEM] CMD -
N0FeaR - 11.06.2012
pawn Код:
}
CMD:sup(playerid, params[])
{
if(GetPlayerState(playerid) == 1)
{
if(PlayerToPoint(5.0,playerid,242.7591,66.4315,1003.6406))
{
SetPlayerPos(playerid, 619.0756,-566.6477,26.1432);
GameTextForPlayer(playerid, "~b~Sheriff Roof",5000,1);
SetPlayerInterior(playerid,0);
SetPlayerVirtualWorld(playerid,0);
}
}
}
line 3599 else
{
SendClientMessage(playerid, COLOR_LIGHTRED, "WARNING: You do not have access to this command.");
}
line 3603 return 1;
}
Re: [PROBLEM] CMD -
N0FeaR - 11.06.2012
Quote:
Originally Posted by zombieking
pawn Код:
CMD:sup(playerid, params[]) { if(GetPlayerState(playerid) == 1) { if(PlayerToPoint(5.0,playerid,242.7591,66.4315,1003.6406)) { SetPlayerPos(playerid, 619.0756,-566.6477,26.1432); GameTextForPlayer(playerid, "~b~Sheriff Roof",5000,1); SetPlayerInterior(playerid,0); SetPlayerVirtualWorld(playerid,0); } } else { SendClientMessage(playerid, COLOR_LIGHTRED, "WARNING: You do not have access to this command."); } return 1; }
Try this.
|
I get same errors.
Re: [PROBLEM] CMD -
Jhero - 11.06.2012
Try this;
pawn Код:
CMD:sup(playerid, params[])
{
if(GetPlayerState(playerid) == 1)
{
if(PlayerToPoint(5.0,playerid,242.7591,66.4315,1003.6406))
{
SetPlayerPos(playerid, 619.0756,-566.6477,26.1432);
GameTextForPlayer(playerid, "~b~Sheriff Roof",5000,1);
SetPlayerInterior(playerid,0);
SetPlayerVirtualWorld(playerid,0);
}
}
}
else
{
SendClientMessage(playerid, COLOR_LIGHTRED, "WARNING: You do not have access to this command.");
return 1;
}
}
Re: [PROBLEM] CMD -
zombieking - 11.06.2012
I tested the code I gave... And it worked , obviously the errors are not on that lines
@Jhero: The code you gave prompts this error :
pawn Код:
error 010: invalid function or declaration
AW: Re: [PROBLEM] CMD -
Extremo - 11.06.2012
Quote:
Originally Posted by Jhero
Try this;
pawn Код:
CMD:sup(playerid, params[]) { // 1 if(GetPlayerState(playerid) == 1) { // 2 if(PlayerToPoint(5.0,playerid,242.7591,66.4315,1003.6406)) { // 3 SetPlayerPos(playerid, 619.0756,-566.6477,26.1432); GameTextForPlayer(playerid, "~b~Sheriff Roof",5000,1); SetPlayerInterior(playerid,0); SetPlayerVirtualWorld(playerid,0); } // 1 } // 2 } // 3 else { // 4 - this is outside of the actual command SendClientMessage(playerid, COLOR_LIGHTRED, "WARNING: You do not have access to this command."); return 1; } // 4 - this is outside of the actual command }
|
As you can see above that doesn't seem to even work at all just by the looks of it.
Re: [PROBLEM] CMD -
zombieking - 11.06.2012
Just test my code... It will surely work , I tested it myself