SA-MP Forums Archive
/me command errors - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: /me command errors (/showthread.php?tid=608246)



/me command errors - Eymeric69 - 29.05.2016

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


Re: /me command errors - luke49 - 29.05.2016

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;




Re: /me command errors - IzadorO - 29.05.2016

No...

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


Re: /me command errors - AlexBlack - 29.05.2016

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);
        }
    }




Re: /me command errors - Eymeric69 - 29.05.2016

oh thank you that a stupid errors