Few Errors
#1

[QUOTE]Look at this :
Quote:

public OnPlayerDeath(playerid, killerid, reason)
{
// Add 1 to this killer's score.
if(killerid != INVALID_PLAYER_ID) SetPlayerScore(killerid, GetPlayerScore(killerid) + 1);
return 1;
}
{
GameTextForPlayer(playerid,"~r~Wasted",3000,2);
return 1;
}

And this Happen when i Complie It :


Quote:

E:\LOSSAN~1\GAMEMO~1\LSGW2.pwn(52) : warning 202: number of arguments does not match definition
E:\LOSSAN~1\GAMEMO~1\LSGW2.pwn(53) : warning 202: number of arguments does not match definition
E:\LOSSAN~1\GAMEMO~1\LSGW2.pwn(54) : warning 202: number of arguments does not match definition
E:\LOSSAN~1\GAMEMO~1\LSGW2.pwn(93) : error 055: start of function body without function header
E:\LOSSAN~1\GAMEMO~1\LSGW2.pwn(95) : error 010: invalid function or declaration
E:\LOSSAN~1\GAMEMO~1\LSGW2.pwn(135) : warning 217: loose indentation
E:\LOSSAN~1\GAMEMO~1\LSGW2.pwn(140) : warning 217: loose indentation
E:\LOSSAN~1\GAMEMO~1\LSGW2.pwn(145) : warning 209: function "OnPlayerCommandText" should return a value
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


2 Errors.

Any ways to fix this ?
Reply
#2

The code you posted is missing { before SetPlayerScore
And what's this about:
pawn Код:
return 1;
}
{
That's not valid
Reply
#3

Quote:
Originally Posted by Mr.Black
Посмотреть сообщение
Look at this :


And this Happen when i Complie It :





Any ways to fix this ?
•.• Are you joking?


pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
// Add 1 to this killer's score.
if(killerid != INVALID_PLAYER_ID) SetPlayerScore(killerid, GetPlayerScore(killerid) + 1);
return 1; // wtf is that
} // *
{ // *
GameTextForPlayer(playerid,"~r~Wasted",3000,2);
return 1;
}
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
    // Add 1 to this killer's score.
    if(killerid != INVALID_PLAYER_ID) SetPlayerScore(killerid, GetPlayerScore(killerid) + 1);
    GameTextForPlayer(playerid,"~r~Wasted",3000,2);
    return 1;
}
Pawn syntax is

Код:
FunctionName(Args)
{
    Function1;
    Function2;
    Function3;
    return;
}
NOT

Код:
FunctionName(Args)
{
    Function1;
    return;
}
{
    Function2;
    return;
}
{
    Function3;
    return;
}
Reply
#4

Thanks; D
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)