[ajuda] sscanf
#1

pawn Код:
if(strcmp(cmdtext, "/av", true) == 0)
    {
        sscanf(cmdtext[], "d", cmdtext); //error aqui
        SendClientMessageToAll(-1, cmdtext);
        return 1;
    }
o que tem de errado?
Код:
E:\Documents and Settings\Usuбrio\Desktop\GTA SAMP\BDP2\BDP\pawno\Lojas.pwn(60) : error 029: invalid expression, assumed zero
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
Reply
#2

pawn Код:
if(strcmp(cmdtext, "/av", true) == 0)
    {
        new string[128];
        if(sscanf(cmdtext, "s[128]", string)) return 1;
        SendClientMessageToAll(-1, string);
        return 1;
    }
Nгo seria assim ? D: nгo sei...
Reply
#3

num funfou muito bem nгo..
a msg que coloca depois do /av num aparece.. tenso
Reply
#4

pawn Код:
if(!strcmp(cmdtext,"/av", true))
{
    new msg[128];
    if(sscanf(cmdtext,"s[128]",msg))
    {
        SendClientMessage(playerid, -1, "USE: /av [texto]");
        return 1;
    }
    SendClientMessageToAll(-1,msg);
    return 1;
}
Tenso demais, tambйm nunca usei sscanf com a callback OnPlayerCommandText. :/
Reply
#5

nem funfou..
OBS: eu tф tentando usar sscanf na commandtext..
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)