error 025: function heading differs from prototype || It happens after including streamer.inc!
#1

Hey guys, I have a little problem which bothers me a lot. Before you ask me, I updated my streamer plugin and include to the latest version. I just included #include <streamer> in my gamemode, and then there's an error and a warning.

Код HTML:
C:\Users\USER\Desktop\Street Kings Deathmatch\pawno\include\streamer.inc(297) : warning 202: number of arguments does not match definition
>> Line 297: SetPlayerColor(playerid, GANG_VAGOS_COLOR);

Full line of code.

pawn Код:
SetPlayerToTeamColor(playerid)
{
    if (GetTeam{playerid} == GANG_GROVE)
    {
        SetPlayerColor(playerid, GANG_GROVE_COLOR);
    }
    else if (GetTeam{playerid} == GANG_BALLA)
    {
        SetPlayerColor(playerid, GANG_BALLA_COLOR);
    }
    else if (GetTeam{playerid} == GANG_VAGOS)
       {
        SetPlayerColor(playerid, GANG_VAGOS_COLOR); // This is where the warning comes from.
    }
    /*else if  (GetTeam{playerid} == GANG_AZTECAS)
    {
        SetPlayerColor(playerid, GANG_AZTECAS_COLOR);
    }
    else if (GetTeam{playerid} == GANG_DA_NANG) // This is where the error comes from.
    {
        SetPlayerColor(playerid, GANG_DA_NANG_COLOR);
    }
    else if (GetTeam{playerid} == GANG_RIFA)
    {
        SetPlayerColor(playerid, GANG_RIFA_COLOR);
    }
    else if  (GetTeam{playerid} == GANG_TRIADS)
    {
        SetPlayerColor(playerid, GANG_TRIADS_COLOR);
    }
    else if  (GetTeam{playerid} == GANG_RUFFRIDERZ)
    {
        SetPlayerColor(playerid, GANG_RUFFRIDERZ_COLOR);
    }
    else if  (GetTeam{playerid} == GANG_RUSSIANMAFIA)
    {
        SetPlayerColor(playerid, GANG_RUSSIANMAFIA_COLOR);
    }
    else if  (GetTeam{playerid} == GANG_ITALIANMAFIA)
    {
        SetPlayerColor(playerid, GANG_ITALIANMAFIA_COLOR);


    }*/

}
And error..

Код HTML:
C:\Users\USER\Desktop\Street Kings Deathmatch\pawno\include\streamer.inc(304) : error 025: function heading differs from prototype
>> Line 304: {


Can someone please help me about this? I'm seriously pissed off and I don't think there is any problem with my script.
Reply
#2

The error/warning is from streamer.inc file and not your script. The mistake you did though is:
pawn Код:
public OnPlayerDisconnect(playerid)
however, that callback has 2 parameters. Change it to:
pawn Код:
public OnPlayerDisconnect(playerid, reason)
Reply
#3

SetPlayerColor needs a hexa value
pawn Код:
//example
SetPlayerColor(playerid, 0x00DDFF00);
edit: never mind konsta already replied.
Reply
#4

I defined the colors. And thanks Konstantinos, works for me.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)