SA-MP Forums Archive
How to Fix Warning? - 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: How to Fix Warning? (/showthread.php?tid=292633)



How to Fix Warning? - seanny - 24.10.2011

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?


Re: How to Fix Warning? - manchestera - 24.10.2011

Код:
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


Re: How to Fix Warning? - [L3th4l] - 24.10.2011

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"


Re: How to Fix Warning? - seanny - 24.10.2011

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