Any Suggestion?
#1

Hello I get bored and I made SendError function.Can anyone give me suggestion how to fix this just do not post the code just via words no code..Thanks

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/error", cmdtext, true, 10) == 0)
    {
        SendError(playerid,"TRY","SMOR");
        return 1;
    }
    return 0;
}
stock SendError(playerid,header,message)
{
    new message[90],header[25],string[100];
    format(string,sizeof(string),"[%s]%s",header,message);
    SendClientMessage(playerid,string);
    return 1;
}
ERROR
Код:
D:\SA-MP Server Stuff\SA-MP Server\filterscripts\error.pwn(91) : error 035: argument type mismatch (argument 2)
D:\SA-MP Server Stuff\SA-MP Server\filterscripts\error.pwn(98) : warning 219: local variable "message" shadows a variable at a preceding level
D:\SA-MP Server Stuff\SA-MP Server\filterscripts\error.pwn(98) : warning 219: local variable "header" shadows a variable at a preceding level
D:\SA-MP Server Stuff\SA-MP Server\filterscripts\error.pwn(100) : error 035: argument type mismatch (argument 2)
D:\SA-MP Server Stuff\SA-MP Server\filterscripts\error.pwn(96) : warning 203: symbol is never used: "message"
D:\SA-MP Server Stuff\SA-MP Server\filterscripts\error.pwn(96) : warning 203: symbol is never used: "header"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Errors.
Reply
#2

SendClientMessage has got a COLOR parameter, fill that in.
Delete these:
pawn Код:
new message[90],header[25]
Because you already have those as parameters for your function.

+It should be like this:
pawn Код:
stock SendError(playerid,const header[],const message[])
Reply
#3

Quote:
Originally Posted by zombieking
Посмотреть сообщение
SendClientMessage has got a COLOR parameter, fill that in.
Delete these:
pawn Код:
new message[90],header[25]
Because you already have those as parameters for your function.

+It should be like this:
pawn Код:
stock SendError(playerid,const header[],const message[])
Ohh yea thanks for suggestion
Reply
#4

No problem, glad I could help you.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)