Format help.
#1

OK im obviously a newer scripter or I wouldn't have problems with such an easy little piece of code..I am custom scripting my own TDM server cause everyone loved TDM right? Right. So my problem is this..

Код:
C:\Users\Zack Farmer\Desktop\Lilrebels Folder\Scripting\Scripts\CountrySide.pwn(1006) : warning 202: number of arguments does not match definition
C:\Users\Zack Farmer\Desktop\Lilrebels Folder\Scripting\Scripts\CountrySide.pwn(1006) : warning 202: number of arguments does not match definition
C:\Users\Zack Farmer\Desktop\Lilrebels Folder\Scripting\Scripts\CountrySide.pwn(1247) : warning 202: number of arguments does not match definition
C:\Users\Zack Farmer\Desktop\Lilrebels Folder\Scripting\Scripts\CountrySide.pwn(1247) : warning 202: number of arguments does not match definition
These are my errors I continue getting now here is the code its around..This one is suppose to, when you log in, say Welcome login to continue [insert player name]. but it just gives me an odd looking icon when I login.

Код:
public OnPlayerConnect(playerid)
{
	new string[128];
    format(string,sizeof(string),"Welcome login to continue %s",GetPlayerName(playerid));//This is line 1006
    SendClientMessage(playerid,COLOR_GREY,string);
    SendClientMessage(playerid,COLOR_YELLOW,"Country Side TDM v1.1a");
    return 1;
}
and this.

Код:
public OnPlayerDeath(playerid,killerid,reason)
{
    if(IsPlayerConnected(killerid)) {
        new killcash = random(1500);
        new string[128];
        GivePlayerMoney(killerid, killcash);
        GivePlayerMoney(playerid, -killcash);
        format(string, sizeof(string), "You just killed %s and looted $%d from the them.", GetPlayerName(killerid), killcash);// this is line 1247
    }
    return 1;
}
On this one when you kill someone you get the money but it doesnt say "You just killed [insert player name] and looted [amount] from them. Ive been trying to fix this for a while but couldnt get it.
Reply
#2

first:
pawn Код:
public OnPlayerConnect(playerid)
{
    new string[128],Name[MAX_PLAYER_NAME];
    GetPlayerName(playerid,Name,sizeof(Name));
    format(string,sizeof(string),"Welcome login to continue %s",Name);
    SendClientMessage(playerid,COLOR_GREY,string);
    SendClientMessage(playerid,COLOR_YELLOW,"Country Side TDM v1.1a");
    return 1;
}
second:
pawn Код:
public OnPlayerDeath(playerid,killerid,reason)
{
    if(IsPlayerConnected(killerid)) {
        new killcash = random(1500);
        new string[128],KillerName[MAX_PLAYER_NAME];
        GetPlayerName(killerid,KillerName,sizeof(KillerName));
        GivePlayerMoney(killerid, killcash);
        GivePlayerMoney(playerid, -killcash);
        format(string, sizeof(string), "You just killed %s and looted $%d from the them.", KillerName, killcash);
    }
    return 1;
}
Reply
#3

Second:
PHP код:
public OnPlayerDeath(playerid,killerid,reason)
{
    if(
IsPlayerConnected(killerid)) 
    {
        new 
killcash random(1500);
        new 
string[128], name[MAX_PLAYER_NAME];
        
GetPlayerName(playeridnamesizeof(name));
        
GivePlayerMoney(killeridkillcash);
        
GivePlayerMoney(playerid, -killcash);
        
format(stringsizeof(string), "You just killed %s and looted $%d from the them."namekillcash);
        
SendClientMessage(killeridstring);
    }
    return 
1;

Reply
#4

Thank both of you guys that really helped!
Reply
#5

Quote:
Originally Posted by Jafet_Macario
Посмотреть сообщение
Second:
PHP код:
public OnPlayerDeath(playerid,killerid,reason)
{
    if(
IsPlayerConnected(killerid)) 
    {
        new 
killcash random(1500);
        new 
string[128], name[MAX_PLAYER_NAME];
        
GetPlayerName(playeridnamesizeof(name));
        
GivePlayerMoney(killeridkillcash);
        
GivePlayerMoney(playerid, -killcash);
        
format(stringsizeof(string), "You just killed %s and looted $%d from the them."namekillcash);
        
SendClientMessage(killeridstring);
    }
    return 
1;

he want to send it to the killer(ho killed this player) not ho were killed... :\
Reply
#6

Quote:
Originally Posted by xkirill
Посмотреть сообщение
he want to send it to the killer(ho killed this player) not ho were killed... :\
And what this tells you?
PHP код:
SendClientMessage(killeridstring); 
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)