An odd warning
#1

Код:
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;
}
Reply
#2

What are lines 286 and 294?
Reply
#3

https://sampwiki.blast.hk/wiki/GetPlayerScore

GetPlayerScore returns the score.
So you would do:
pawn Код:
RussiaScore = GetPlayerScore(playerid);
USAScore = GetPlayerScore(playerid);

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

Quote:
Originally Posted by Mikkel_Pedersen
Посмотреть сообщение
https://sampwiki.blast.hk/wiki/GetPlayerScore

GetPlayerScore returns the score.
So you would do:
pawn Код:
RussiaScore = GetPlayerScore(playerid);
USAScore = GetPlayerScore(playerid);

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.
Big help, Thanks bud
Reply
#5



Did i do something wrong?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)