SA-MP Forums Archive
[Ajuda] Alguem sabe onde eu to errando ? pode Ajudar ? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Ajuda] Alguem sabe onde eu to errando ? pode Ajudar ? (/showthread.php?tid=558424)



Alguem sabe onde eu to errando ? pode Ajudar ? - VinnyScript - 17.01.2015

Код:
CMD:contar(playerid, params[])
{
     new CBDStr[128]
     if(Contar == 1) return SendClientMessage(playerid, -1, "{3cff00}[CBD] {FFFFFF}Ja tem uma Contagem em Progresso!");
     format(CBDStr, sizeof(CBDStr),"{3cff00}[CBD] {f00c0c}%s {FFFFFF}Iniciou uma contagem... {3cff00}(/Contar)",Nome(playerid);
     Contar = 1;
	 SetTimerEx("Contar3", 500, false, "d", playerid);
	 SendClientMessageToAll(0xFFFF00AA, CBDStr);
	 return 1;
	}
......


Re: Alguem sabe onde eu to errando ? pode Ajudar ? - VinnyScript - 17.01.2015

esqueci de posta isso
Код:
C:\Users\Vinny3D\Desktop\CBD\gamemodes\CBD.pwn(2068) : warning 219: local variable "CBDStr" shadows a variable at a preceding level
C:\Users\Vinny3D\Desktop\CBD\gamemodes\CBD.pwn(2069) : error 001: expected token: ";", but found "if"
C:\Users\Vinny3D\Desktop\CBD\gamemodes\CBD.pwn(2070) : error 001: expected token: ",", but found ";"
C:\Users\Vinny3D\Desktop\CBD\gamemodes\CBD.pwn(3987) : warning 203: symbol is never used: "Angle"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Errors.



Re: Alguem sabe onde eu to errando ? pode Ajudar ? - DiegoLeo - 17.01.2015

PHP код:
CMD:contar(playeridparams[])
{
     new 
CBDStr[128];//eskeceu do ";"
     
if(Contar == 1) return SendClientMessage(playerid, -1"{3cff00}[CBD] {FFFFFF}Ja tem uma Contagem em Progresso!");
     
format(CBDStrsizeof(CBDStr),"{3cff00}[CBD] {f00c0c}%s {FFFFFF}Iniciou uma contagem... {3cff00}(/Contar)",Nome(playerid);
     
Contar 1;
     
SetTimerEx("Contar3"500false"d"playerid);
     
SendClientMessageToAll(0xFFFF00AACBDStr);
     return 
1;

Vк se agora da certo


Re: Alguem sabe onde eu to errando ? pode Ajudar ? - VinnyScript - 17.01.2015

C:\Users\Vinny3D\Desktop\CBD\gamemodes\CBD.pwn(206 : warning 219: local variable "CBDStr" shadows a variable at a preceding level
C:\Users\Vinny3D\Desktop\CBD\gamemodes\CBD.pwn(207 0) : error 001: expected token: ",", but found ";"


Re: Alguem sabe onde eu to errando ? pode Ajudar ? - n0minal - 17.01.2015

Vai continuar com erros desse jeito acima, use isto:

Substitua:

new CBDStr[128];

Por :

new mystring[128];

Substitua:

format(CBDStr, sizeof(CBDStr),"{3cff00}[CBD] {f00c0c}%s {FFFFFF}Iniciou uma contagem... {3cff00}(/Contar)",Nome(playerid)

Por:

format(mystring, sizeof(mystring),"{3cff00}[CBD] {f00c0c}%s {FFFFFF}Iniciou uma contagem", nome(playerid));