[Pedido] Relogio
#6

Quote:
Originally Posted by RazorGuigo
Посмотреть сообщение
de uma estuda nela antes de colocar ne sua GM, para entender como funiona

PHP код:
new horas_s=12;
new 
minu_s=0;
public 
OnGameModeInit()//quando o server ligar
{
     
SetTimer("Relogio"10001);
}
public 
Relogio()
{
    
minu_s++;
    if(
minu_s >= 59)
    {
        
minu_s 0;
        
horas_s++;
    }
    if(
horas_s 23)
    {
        
horas_s 0;
        
dia_s++;
    }
    
format(stringsizeof(string), "%02d_%02d"horas_sminu_s);
    for(new 
0GetPlayerPoolSize()+1i++)
    {
        
SetPlayerTime(ihoras_sminu_s);        
        
PlayerTextDrawSetString(iTD[i], string);
        
PlayerTextDrawShow(iTD[i]);
    }
    return 
1;

Mano, ta dando erro:

(71) : error 017: undefined symbol "dia_s"
(71) : warning 215: expression has no effect
(77) : error 017: undefined symbol "TD"
(77) : warning 215: expression has no effect
(77) : error 001: expected token: ";", but found "]"
(77) : error 029: invalid expression, assumed zero
(77) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


5 Errors.[/QUOTE]

PHP код:
public Relogio()
{
    new 
string[255];
    
    
minu_s++;
    if(
minu_s >= 59)
    {
        
minu_s 0;
        
horas_s++;
    }
    if(
horas_s 23)
    {
        
horas_s 0;
        
dia_s++; // Linha 71
    
}
    
format(stringsizeof(string), "%02d_%02d"horas_sminu_s);
    for(new 
0GetPlayerPoolSize()+1i++)
    {
        
SetPlayerTime(ihoras_sminu_s);
        
PlayerTextDrawSetString(iTD[i], string); // Linha 77
        
PlayerTextDrawShow(iTD[i]);
    }
    return 
1;

Reply


Messages In This Thread
Relogio - by WiliHacking - 06.01.2017, 03:26
Programando e Relaxando! - by RazorGuigo - 06.01.2017, 11:47
Re: [Pedido] Relogio (Sem Ser Real, [LEIA]) - by MkeY - 06.01.2017, 13:27
Re: MkeY - by RazorGuigo - 06.01.2017, 13:44
Re: [Pedido] Relogio (Sem Ser Real, [LEIA]) - by ipsLuan - 06.01.2017, 18:01
Re: Programando e Relaxando! - by WiliHacking - 07.01.2017, 20:58
Ajudando e Me Irritando! - by RazorGuigo - 07.01.2017, 21:08
Re: Ajudando e Me Irritando! - by Whoo - 08.01.2017, 00:21

Forum Jump:


Users browsing this thread: 2 Guest(s)