/me command errors
#1

i have some errors when i use this script
PHP код:
CMD:me(playeridparams[])
{
    new 
string[128], action[100];
    if(
sscanf(params"s[100]"action))
    {
        
SendClientMessage(playerid0xAA3333AA"[ERREUR]Utilise : /me [action]");
        return 
1;
    }
    else
    {
        
format(stringsizeof(string), "* %s %s"GetName(playerid), action);
        
ProxDetector(30playeridstring0xC2A2DAAA);
    }
    return 
1;

my includes :
PHP код:
#include <a_samp>
#include <zcmd>
#include <sscanf2>
#include <foreach> 
my errors :
Код:
C:\Users\mickael\Desktop\Serveur SCP\gamemodes\SCPRP.pwn(193) : error 017: undefined symbol "GetName"
C:\Users\mickael\Desktop\Serveur SCP\gamemodes\SCPRP.pwn(194) : error 017: undefined symbol "ProxDetector"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Errors.
thank for the help
Reply
#2

PHP код:
CMD:me(playeridparams[])
{
    new
        
name    MAX_PLAYER_NAME ],
        
string    128 ],
        
action    100 ];
        
    if(
sscanf(params"s[100]"action)) {
        
SendClientMessage(playerid0xAA3333AA"[ERREUR]Utilise : /me [action]");
        return 
1;
    }
    else {
        
GetPlayerName(playeridnamesizeof(name));
        
format(stringsizeof(string), "* %s %s"nameaction);
        
SendClientMessage(playerid, -1string);
    }
    return 
1;

Reply
#3

No...

You haven't got ProxDetector or GetName defined in your script.
Reply
#4

Quote:
Originally Posted by luke49
Посмотреть сообщение
PHP код:
CMD:me(playeridparams[])
{
    new
        
name    MAX_PLAYER_NAME ],
        
string    128 ],
        
action    100 ];
        
    if(
sscanf(params"s[100]"action)) {
        
SendClientMessage(playerid0xAA3333AA"[ERREUR]Utilise : /me [action]");
        return 
1;
    }
    else {
        
GetPlayerName(playeridnamesizeof(name));
        
format(stringsizeof(string), "* %s %s"nameaction);
        
SendClientMessage(playerid, -1string);
    }
    return 
1;

This is not correct, it will send message to the playerid.

btw the problem is because you didn't define those 2 functions

PHP код:
stock GetName(playerid)
{
    new 
playername[MAX_PLAYER_NAME];
    
GetPlayerName(playeridplayernameMAX_PLAYER_NAME);
    return 
playername;
}
stock ProxDetector(Float:arearadiplayerid, const string[],color)
{
    new 
Float:x,
        
Float:y,
        
Float:z;
    
GetPlayerPos(playerid,x,y,z);
    foreach(new 
iPlayer) {
        if(
IsPlayerInRangeOfPoint(i,arearadi,x,y,z))
        {
            
SendClientMessage(i,color,string);
        }
    }

Reply
#5

oh thank you that a stupid errors
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)