One little error (Invalid function or declaration) - 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: One little error (Invalid function or declaration) (
/showthread.php?tid=471120)
One little error (Invalid function or declaration) -
MrBlake - 21.10.2013
C:\Documents and Settings\Adrian\Desktop\Kappa-Zone\Kappa RPG 0.1\gamemodes\beta.pwn(4225) : error 010: invalid function or declaration
__________________________________________________ ___________
So, lets go to line
4225:
Код:
public SetPlayerSpawn(playerid)
{
if(IsPlayerConnected(playerid))
{
if ((gTeam[playerid]) == 1)
{
SetPlayerToTeamColor(playerid);
SetPlayerFacingAngle(playerid, 270.0);
SetPlayerInterior(playerid,0);
PlayerInfo[playerid][pInt] = 0;
SetPlayerVirtualWorld(playerid,0);
return 1;
}
if(PlayerInfo[playerid][pFMember] != 255)
{
new family = PlayerInfo[playerid][pFMember];
SetPlayerToTeamColor(playerid);
SetPlayerInterior(playerid, FamilyInfo[family][FamilyInterior]);
SetPlayerPos(playerid, FamilyInfo[family][FamilySpawn][0],FamilyInfo[family][FamilySpawn][1],FamilyInfo[family][FamilySpawn][2]);
SetPlayerFacingAngle(playerid, FamilyInfo[family][FamilySpawn][3]);
return 1;
}
else
{
SetPlayerToTeamColor(playerid);
if(PlayerInfo[playerid][pOrigin] == 1) // Los Santos Spawn Civil
{
SetPlayerPos(playerid,410.1779,-1603.6237,36.8);
SetPlayerFacingAngle(playerid, 46.8583);
SetPlayerInterior(playerid,0);
PlayerInfo[playerid][pInt] = 0;
SetPlayerVirtualWorld(playerid,0);
}
else if(PlayerInfo[playerid][pOrigin] == 2)//San Fierro Civil
{
SetPlayerPos(playerid,-1968.4854,109.9466,27.6875);
SetPlayerFacingAngle(playerid, 183.1478);
SetPlayerInterior(playerid,0);
SetPlayerVirtualWorld(playerid,0);
}
return 1;
}
}
return 1;
}
P.S: Line 4225 is the last "return 1"
So, whats the problem here?
Re: One little error (Invalid function or declaration) -
xVIP3Rx - 21.10.2013
You should remove the last "return 1;"