Bug Sscanf2
#1

Hola, no sй porque me dб problemas el sscanf, cambiй de PC y casi todos los comandos me dбn errores

Este es uno de ellos, algo tan bбsico pero no le encuentro el error por ningun lado

PHP код:
#define TEXT_OUTPUT 128
CMD:a(playeridparams[])
{
    new 
text[TEXT_OUTPUT];
    if(
PlayerInfo[playerid][Admin] < 1) return SendClientMessage(playeridCOLOR_MESSAGES[6], "No Autorizado!");
    if(
sscanf(params"s[" #TEXT_OUTPUT "]", text)) return SendClientMessage(playerid, COLOR_MESSAGES[6], "Uso: /A [Texto]");
     
format(textsizeof(text), "%s %s %s: %s",LOGO_STAFFAdminsRangosChat[PlayerInfo[playerid][Admin]], GetName(playerid), text);
     
AdminChatStream(COLOR_MESSAGES[3], text);
    return 
1;
}
stock AdminChatStream(colstring[])
{
    foreach(new 
Player)
    {
        if(
PlayerInfo[i][Admin] >= && IsPlayerConnected(i) && PlayerInfo[i][IsLoggedIn] == true)
            {
                
SendClientMessage(icolstring);}
    }return 
1;

Me queda en el return Uso /A [Texto]
Reply
#2

PHP код:
if(!sscanf(... 
Proba asi
Reply
#3

Quote:
Originally Posted by Whillyrez
Посмотреть сообщение
PHP код:
if(!sscanf(... 
Proba asi
Ya probe de esa manera, me sigue dando el mismo error
Reply
#4

y probaste asi? ._.

Код:
CMD:a(playerid, params[])
{
    new text[128];
    if(PlayerInfo[playerid][Admin] < 1) return SendClientMessage(playerid, COLOR_MESSAGES[6], "No Autorizado!");
    if(sscanf(params, "s[128]", text)) return SendClientMessage(playerid, COLOR_MESSAGES[6], "Uso: /A [Texto]");

	format(text, sizeof(text), "%s %s %s: %s",LOGO_STAFF, AdminsRangosChat[PlayerInfo[playerid][Admin]], GetName(playerid), text);
    AdminChatStream(COLOR_MESSAGES[3], text);
    return 1;
}
Reply
#5

Quote:
Originally Posted by FelipeAndres
Посмотреть сообщение
y probaste asi? ._.

Код:
CMD:a(playerid, params[])
{
    new text[128];
    if(PlayerInfo[playerid][Admin] < 1) return SendClientMessage(playerid, COLOR_MESSAGES[6], "No Autorizado!");
    if(sscanf(params, "s[128]", text)) return SendClientMessage(playerid, COLOR_MESSAGES[6], "Uso: /A [Texto]");

	format(text, sizeof(text), "%s %s %s: %s",LOGO_STAFF, AdminsRangosChat[PlayerInfo[playerid][Admin]], GetName(playerid), text);
    AdminChatStream(COLOR_MESSAGES[3], text);
    return 1;
}
Voy a probar pero no sй porque no me detecta el array TEXT_OUTPUT


EDIT; No me sirviу
Reply
#6

PHP код:
CMD:a(playeridparams[])
{
    new 
text[128];
    if(
PlayerInfo[playerid][Admin] < 1) return SendClientMessage(playeridCOLOR_MESSAGES[6], "No Autorizado!");
    if(!
sscanf(params"s[128]"text))
    {    
         
format(textsizeof(text), "%s %s %s: %s",LOGO_STAFFAdminsRangosChat[PlayerInfo[playerid][Admin]], GetName(playerid), text);
         
AdminChatStream(COLOR_MESSAGES[3], text);
     }
     else 
SendClientMessage(playeridCOLOR_MESSAGES[6], "Uso: /A [Texto]");
     return 
1;

No se si va a andar, no lo probe
Reply
#7

Quote:
Originally Posted by Whillyrez
Посмотреть сообщение
PHP код:
CMD:a(playeridparams[])
{
    new 
text[128];
    if(
PlayerInfo[playerid][Admin] < 1) return SendClientMessage(playeridCOLOR_MESSAGES[6], "No Autorizado!");
    if(!
sscanf(params"s[128]"text))
    {    
         
format(textsizeof(text), "%s %s %s: %s",LOGO_STAFFAdminsRangosChat[PlayerInfo[playerid][Admin]], GetName(playerid), text);
         
AdminChatStream(COLOR_MESSAGES[3], text);
     }
     else 
SendClientMessage(playeridCOLOR_MESSAGES[6], "Uso: /A [Texto]");
     return 
1;

No se si va a andar, no lo probe
no sirve
Reply
#8

Se te carga bien el plugin?
PHP код:
CMD:a(playeridparams[])
{
    new 
text[128];
    if(
PlayerInfo[playerid][Admin] < 1) return SendClientMessage(playeridCOLOR_MESSAGES[6], "No Autorizado!");
    if(
sscanf(params"s[128]"text)) return SendClientMessage(playeridCOLOR_MESSAGES[6], "Uso: /A [Texto]");
    else {
    
format(textsizeof(text), "%s %s %s: %s",LOGO_STAFFAdminsRangosChat[PlayerInfo[playerid][Admin]],                GetName(playerid), text);
        
AdminChatStream(COLOR_MESSAGES[3], text);
    }
    return 
1;

Ya si no anda este, voy a empezar a probarlo...(Es lo que deberia hacer desde un principio, pero me da vagancia)
Reply
#9

El plugin si carga bien


PHP код:
----------
Loaded log file"server_log.txt".
----------
SA-MP Dedicated Server
----------------------
v0.3.7-R2, (C)2005-2015 SA-MP Team
[00:49:06filterscripts ""  (string)
[
00:49:06
[
00:49:06Server Plugins
[00:49:06] --------------
[
00:49:06]  Loading pluginmysql
[00:49:06]  >> plugin.mysqlR41-2 successfully loaded.
[
00:49:06]   Loaded.
[
00:49:06]  Loading pluginWhirlpool
[00:49:06]  
[
00:49:06]  ==================
[
00:49:06]  
[
00:49:06]   Whirlpool loaded
[00:49:06]  
[
00:49:06]  ==================
[
00:49:06]  
[
00:49:06]   Loaded.
[
00:49:06]  Loading pluginsscanf
[00:49:06
[
00:49:06]  ===============================
[
00:49:06]       sscanf plugin loaded.     
[
00:49:06]          Version:  2.8.2        
[00:49:06]    (c2012 Alex "******" Cole  
[00:49:06]  ===============================
[
00:49:06]   Loaded.
[
00:49:06]  Loaded 3 plugins.
[
00:49:07
[
00:49:07Filterscripts
[00:49:07] ---------------
[
00:49:07]   Loaded 0 filterscripts.
[
00:49:07MySQL connection is successful.
[
00:49:07Number of vehicle models0
[00:50:08] [connection127.0.0.1:54948 requests connection cookie.
[
00:50:09] [connectionincoming connection127.0.0.1:54948 id0
[00:50:09Conexiуn entrante IP127.0.0.1Puerto54948
[00:50:09] [joinEloy_Gonzalez has joined the server (0:127.0.0.1
Edit:

Ahora que cambiй de procesador de comandos no me registra el comando, me llama al Callback

PHP код:
public OnPlayerCommandPerformed(playeridcmd[], params[], success)
{
    if(!
success) return SendClientMessage(playeridCOLOR_MESSAGES[0], "Error N° 1: Este comando no existe, usa /Ayuda para mбs informaciуn");
    return 
1;

Me retorna el SendClientMessage del OnPlayerCommandPerformed
Reply
#10

Cambiaste de version del zcmd? O cambiaste a otro procesador? Cual?
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)