How to Fix Warning?
#1

Hello, I am Getting this Warning

C:\Users\Shaun\Desktop\LSC-RP Custom Version\gamemodes\drp.pwn(577) : warning 202: number of arguments does not match definition
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
    PlayerInfo[killerid][pKills]++;
    PlayerInfo[playerid][pDeaths]++;
    SendClientMessage(playerid,COLOR_LIGHTRED,"(( You have lost 30 minutes if memory, You CAN'T return to the position when you died ...");
    SendClientMessage(playerid,COLOR_LIGHTRED,"... Unless told to by either an Admin or Faction Leader ))");
    SendClientMessage(playerid,COLOR_WHITE,"[DOCTOR]: Try and not get injured next time.");
    SetPlayerPos(playerid, 1176.6326,-1325.5374,14.0309,270.0000);//Here is line 577
    return 1;
}
What does it mean? and what can it do?
Reply
#2

Код:
public OnPlayerDeath(playerid, killerid, reason)
{
    PlayerInfo[killerid][pKills]++;
    PlayerInfo[playerid][pDeaths]++;
    SendClientMessage(playerid,COLOR_LIGHTRED,"(( You have lost 30 minutes if memory, You CAN'T return to the position when you died ...");
    SendClientMessage(playerid,COLOR_LIGHTRED,"... Unless told to by either an Admin or Faction Leader ))");
    SendClientMessage(playerid,COLOR_WHITE,"[DOCTOR]: Try and not get injured next time.");
    SetPlayerPos(playerid, 1176.6326,-1325.5374,14.0309);//Here is line 577
    SetPlayerFacingAngle( playerid, 270 );
    return 1;
}
That should fix it

Edited to include facing angle
Reply
#3

SetPlayerPos(0, 1, 2, 3);

0: playerid
1: X Pos
2: Y Pos
3: Z Pos

You have an extra, which would be 4 and that's "SetPlayerFacingAngle"
Reply
#4

Quote:
Originally Posted by manchestera
Посмотреть сообщение
Код:
public OnPlayerDeath(playerid, killerid, reason)
{
    PlayerInfo[killerid][pKills]++;
    PlayerInfo[playerid][pDeaths]++;
    SendClientMessage(playerid,COLOR_LIGHTRED,"(( You have lost 30 minutes if memory, You CAN'T return to the position when you died ...");
    SendClientMessage(playerid,COLOR_LIGHTRED,"... Unless told to by either an Admin or Faction Leader ))");
    SendClientMessage(playerid,COLOR_WHITE,"[DOCTOR]: Try and not get injured next time.");
    SetPlayerPos(playerid, 1176.6326,-1325.5374,14.0309);//Here is line 577
    SetPlayerFacingAngle( playerid, 270 );
    return 1;
}
That should fix it

Edited to include facing angle
Thanks
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)