SA-MP Forums

Go Back   SA-MP Forums > Non-English > Languages > Português/Portuguese

Reply
 
Thread Tools Display Modes
Old 10/04/2012, 12:33 PM   #1
[NVC]Eduardo
Huge Clucker
 
[NVC]Eduardo's Avatar
 
Join Date: Jan 2012
Posts: 224
Reputation: 1
Question [Ajuda] /Contagem

Erros:
pawn Code:
Bernardo\Desktop\Server\samp\gamemodes\GM.pwn(10916) : error 047: array sizes do not match, or destination array is too small
C:\Users\Bernardo\Desktop\Server\samp\gamemodes\GM.pwn(10924) : warning 219: local variable "contagem" shadows a variable at a preceding level
C:\Users\Bernardo\Desktop\Server\samp\gamemodes\GM.pwn(10926) : error 006: must be assigned to an array
C:\Users\Bernardo\Desktop\Server\samp\gamemodes\GM.pwn(10927) : error 028: invalid subscript (not an array or too many subscripts): "contagem"
C:\Users\Bernardo\Desktop\Server\samp\gamemodes\GM.pwn(10927) : warning 215: expression has no effect
C:\Users\Bernardo\Desktop\Server\samp\gamemodes\GM.pwn(10927) : error 001: expected token: ";", but found "]"
C:\Users\Bernardo\Desktop\Server\samp\gamemodes\GM.pwn(10927) : error 029: invalid expression, assumed zero
C:\Users\Bernardo\Desktop\Server\samp\gamemodes\GM.pwn(10927) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase

Code:
pawn Code:
if(strcmp("/contagem", cmdtext, true, 10) == 0)
{
    new tmp[128];
    new aname[MAX_PLAYER_NAME];
    GetPlayerName(playerid, aname, MAX_PLAYER_NAME);
    format(file, sizeof(file), PASTA_CONTAS, aname);
    if(pAdmin[playerid] == 5) {

        tmp = strtok(cmdtext, idx);
        if(!strlen(tmp)) {
            SendClientMessage(playerid, Vermelho, "Uso: /contagem [quantia]");
            return 1;
        }
        new contando = strval(tmp);
        new Float:contagemx,Float:contagemy,Float:contagemz; // BRAHMA *-*
        GetPlayerPos(playerid, contagemx, contagemy, contagemz);
        for(new contagem; contagem < MAX_PLAYERS; contagem++) {
        if(IsPlayerInRangeOfPoint(contagem, 10.0, contagemx, contagemy, contagemz)) {
                contar[playerid] = contar;
                contagem[playerid] = SetTimerEx("Contagem", 1000, true, "i", i);
            }
        }
    }
    else {
        SendClientMessage(playerid, Vermelho, "I ERRO I Você não tem acesso a esse comando!");
    }
    return 1;
}

+ rep
__________________
Brasil - Virtual World RPG® v1.0
IP: 37.59.160.245:7777
+ Forum: vwbrasil.forumeiros.com
[NVC]Eduardo is offline   Reply With Quote
Old 10/04/2012, 01:02 PM   #2
kinhobryant
Huge Clucker
 
kinhobryant's Avatar
 
Join Date: Jan 2012
Posts: 460
Reputation: 13
Default Re: [Ajuda] /Contagem

mal indentado.
kinhobryant is offline   Reply With Quote
Old 10/04/2012, 01:02 PM   #3
GReeN_WOoD
Huge Clucker
 
Join Date: Dec 2011
Posts: 330
Reputation: 25
Default Re: [Ajuda] /Contagem

PHP Code:
new string[56];
new 
tempoTempoContando;
forward Contando();

CMD:contagem(playeridparams[])
{
    if(
sscanf(params"i"time)) return SendClientMessage(playerid,-1,"Use: /contagem [segundos]");
    if((
tempo 1) || (tempo 60)) return SendClientMessage(playeridCINZA"Máximo de segundos: 60");
    
format(stringsizeof(string), "Contagem de %d segundos iniciada."tempo);
    
SendClientMessageToAll(-1string);
    
TempoContandoSetTimer("Contando"1000true);
    return 
true;
}

public 
Contando()
{
    if(
tempo == 0)
    {
        
KillTimer(TempoContando);
           
SendClientMessage(playerid,-1,"A contagem terminou.");
        
GameTextForAll("~r~contagem terminada"10006);
        return 
true;
    }
    
format(stringsizeof(string), "~g~%d"tempo);
    
GameTextForAll(string10006);
    
tempo--;
    return 
true;

GReeN_WOoD is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[Ajuda] For de contagem cotonete Português/Portuguese 1 31/01/2012 11:24 AM
[Ajuda] Em relação a Contagem.. [O.z]Caroline Português/Portuguese 7 02/11/2011 12:00 PM
[AJUDA] Sistema de contagem. Bruno Pereira Português/Portuguese 4 22/07/2011 01:31 AM
[AJUDA] Contagem Regressiva '-'... Bruno Pereira Português/Portuguese 5 10/07/2011 11:41 AM
[AJUDA] Comando /contagem marcos5680 Português/Portuguese 12 16/06/2011 08:52 PM


All times are GMT. The time now is 05:47 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.