Can Someone Help Solve This Error?
#1

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;
Reply
#2

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;
}
Reply
#3

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)
Reply
#4

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!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)