C:\Documents and Settings\Chris\Desktop\SAMP Server\gamemodes\WorldWar.pwn(286) : warning 202: number of arguments does not match definition C:\Documents and Settings\Chris\Desktop\SAMP Server\gamemodes\WorldWar.pwn(294) : warning 202: number of arguments does not match definition Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 2 Warnings.
public OnPlayerDeath(playerid, killerid, reason) { SetPlayerScore(killerid,GetPlayerScore(killerid)+1); if(GetPlayerTeam(killerid) == 1) { RussiaScore++; //Sets team1score new newtext[41]; GetPlayerScore(playerid, RussiaScore);//this code gives warning format(newtext, sizeof(newtext), "BLUE: %d", RussiaScore); TextDrawSetString(Text:Textdraw0, newtext); } if(GetPlayerTeam(killerid) == 2) { USAScore++; //Sets team2score new newtext[41]; GetPlayerScore(playerid, USAScore);// This code produces warning format(newtext, sizeof(newtext), "Red: %d", USAScore); TextDrawSetString(Text:Textdraw1, newtext); } if(RussiaScore == 100 || USAScore == 100) { SendRconCommand("gmx"); //Restarts Server } return 1; }
RussiaScore = GetPlayerScore(playerid);
USAScore = GetPlayerScore(playerid);
https://sampwiki.blast.hk/wiki/GetPlayerScore
GetPlayerScore returns the score. So you would do: pawn Код:
EDIT: Of what I could see, it seems quite useless to first do "Russia/USAScore++" and then setting its value to the killed player's score. |