SA-MP Forums Archive
Can Someone Help Solve This Error? - 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: Can Someone Help Solve This Error? (/showthread.php?tid=261338)



Can Someone Help Solve This Error? - Bmxerlmao5288 - 13.06.2011

These are the errors

Код:
C:\Documents and Settings\Administrator\Desktop\New GTA Server\gamemodes\DeathMatch.pwn(214) : error 010: invalid function or declaration
C:\Documents and Settings\Administrator\Desktop\New GTA Server\gamemodes\DeathMatch.pwn(219) : error 010: invalid function or declaration
This is the Code

Код:
public OnPlayerDeath(playerid, killerid, reason)
{
    SendDeathMessage(killerid, playerid, reason);
    return 1;
}
    if(IsPlayerConnected(killerid))
	{
    	GivePlayerMoney(killerid, 50);
    	SetPlayerScore(killerid, GetPlayerScore(killerid) +1);
 	}
	return 1;



Re: Can Someone Help Solve This Error? - futuretrucker - 13.06.2011

You messed up the brackets and returns.
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
    SendDeathMessage(killerid, playerid, reason);
    if(IsPlayerConnected(killerid))
    {
        GivePlayerMoney(killerid, 50);
        SetPlayerScore(killerid, GetPlayerScore(killerid) +1);
    }
return 1;
}



Re: Can Someone Help Solve This Error? - jot16 - 13.06.2011

Quote:
Originally Posted by Bmxerlmao5288
Посмотреть сообщение
These are the errors

Код:
C:\Documents and Settings\Administrator\Desktop\New GTA Server\gamemodes\DeathMatch.pwn(214) : error 010: invalid function or declaration
C:\Documents and Settings\Administrator\Desktop\New GTA Server\gamemodes\DeathMatch.pwn(219) : error 010: invalid function or declaration
This is the Code

Код:
public OnPlayerDeath(playerid, killerid, reason);
{
    SendDeathMessage(killerid, playerid, reason);
    return 1;
}
    if(IsPlayerConnected(killerid)
	{
    	GivePlayerMoney(killerid, 50);
    	SetPlayerScore(killerid, GetPlayerScore(killerid) +1);
 	}
	return 1;
try that.added semicolon after reason and delete a bracket around 50)) change it to 50)


Re: Can Someone Help Solve This Error? - Bmxerlmao5288 - 13.06.2011

Quote:
Originally Posted by futuretrucker
Посмотреть сообщение
You messed up the brackets and returns.
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
    SendDeathMessage(killerid, playerid, reason);
    if(IsPlayerConnected(killerid))
    {
        GivePlayerMoney(killerid, 50);
        SetPlayerScore(killerid, GetPlayerScore(killerid) +1);
    }
return 1;
}
Thank You Very Much!