include help
#1

so i create an include, him code:
PHP код:
#include <a_samp>
/*
native pn(playerid);
native pm(playerid);
native interior(playerid, interiorid);
native scm(playerid, color, const message[]);
*/
stock pn(playerid)
{
    new 
pn[MAX_PLAYER_NAME];
    
GetPlayerName(playerid,pn,sizeof(pn));
    return 
pn;
}
stock pm(playerid)
{
    new 
pm GetPlayerMoney(playerid);
    return 
pm;
}
stock interior(playeridinteriorid)
{
    
SetPlayerInterior(playeridinteriorid);
    return 
1;
}
stock scm(playeridcolor, const message[])
{
    
SendClientMessage(playeridcolor, const message[]);
    return 
1;

Exapmle:
when i write to my mode
PHP код:
scm(playerid,0xFFFFFFFF,"asdsaddsaddas"); 
I see that errors:
PHP код:
C:\Users\&#196;èìà\Desktop\USWW\pawno\include\mfunc.inc(30) : error 029: invalid expression, assumed zero
C:\Users\&#196;èìà\Desktop\USWW\pawno\include\mfunc.inc(30) : error 029: invalid expression, assumed zero
C:\Users\&#196;èìà\Desktop\USWW\pawno\include\mfunc.inc(30) : error 029: invalid expression, assumed zero
C:\Users\&#196;èìà\Desktop\USWW\pawno\include\mfunc.inc(30) : fatal error 107: too many error messages on one line 
wtf?
Reply
#2

Try this stock
pawn Код:
stock scm(playerid, color, text[])
{
 return SendClientMessage(playerid, color, text);
}
//Or you can use it through defines
#define scm(%0,%1,%2) SendClientMessage(%0,%1,%2)
.
Reply
#3

Quote:
Originally Posted by Lordz™
Посмотреть сообщение
Try this stock
pawn Код:
stock scm(playerid, color, text[])
{
 return SendClientMessage(playerid, color, text);
}
//Or you can use it through defines
#define scm(%0,%1,%2) SendClientMessage(%0,%1,%2)
.
Or:

pawn Код:
#define scm SendClientMessage
Reply
#4

tnhx
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)