Raised This Month: $ Target: $400
 0% 

Help me please, error when compiling


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Fururasshu
Junior Member
Join Date: Sep 2023
Old 09-15-2023 , 22:50   Help me please, error when compiling
Reply With Quote #1

Quote:
warmup.sma(20) : error 029 invalid expression, assumed zero
warmup.sma(20) : warning 215: expression has no effect
warmup.sma(20) : error 029 invalid expression, assumed zero
warmup.sma(20) : error 029 invalid expression, assumed zero
warmup.sma(20) : fatal error 107: too many error messages on one line
PHP Code:
#include <amxmodx>
#include <fun>

new WarmupTime 60// Duración del calentamiento en segundos
new WarmupMusic[] = "music/warmup.mp3"// Ruta de la música de calentamiento

public plugin_init()
{
    
register_plugin("warmup""1.0""a stranger");
    
    
register_clcmd("warmup""cmd_warmup");
}

public 
cmd_warmup(id)
{
    new 
time get_user_weapon(id); // Obtenemos el arma actual del jugador
    
    
if (time == CSW_AWP || time == CSW_AK47 || time == CSW_M4A1)
    {
        
set_task(WarmupTimer1000_id);
        
client_print(idprint_console"¡Calentamiento iniciado!");
        
        
// Reproducir música
        
client_cmd(id"mp3 play "WarmupMusic" 1");
    }
    else
    {
        
client_print(idprint_console"No se puede realizar el calentamiento con esta arma.");
    }
}

public 
WarmupTimer(id)
{
    if (
WarmupTime 0)
    {
        
client_print(idprint_chat"¡Tiempo restante de calentamiento: "WarmupTime" segundos!");
        
WarmupTime--;
        
set_task(WarmupTimer1000_id);
    }
    else
    {
        
client_print(idprint_chat"¡Calentamiento finalizado!");
        
        
// Detener música gradualmente
        
client_cmd(id"mp3 fadeout 5");
    }
}
#include <amxmodx>
#include <fun>

new WarmupTime 60// Duración del calentamiento en segundos
new WarmupMusic[] = "music/warmup.mp3"// Ruta de la música de calentamiento

public plugin_init()
{
    
register_plugin("warm-up""1.0""a stranger");
    
    
register_clcmd("warmup""cmd_warmup");
}

public 
cmd_warmup(id)
{
    new 
time get_user_weapon(id); // Obtenemos el arma actual del jugador
    
    
if (time == CSW_AWP || time == CSW_AK47 || time == CSW_M4A1)
    {
        
set_task(WarmupTimer1000_id);
        
client_print(idprint_console"¡Calentamiento iniciado!");
        
        
// Reproducir música
        
client_cmd(id"mp3 play "WarmupMusic" 1");
    }
    else
    {
        
client_print(idprint_console"No se puede realizar el calentamiento con esta arma.");
    }
}

public 
WarmupTimer(id)
{
    if (
WarmupTime 0)
    {
        
client_print(idprint_chat"¡Tiempo restante de calentamiento: "WarmupTime" segundos!");
        
WarmupTime--;
        
set_task(WarmupTimer1000_id);
    }
    else
    {
        
client_print(idprint_chat"¡Calentamiento finalizado!");
        
        
// Detener música gradualmente
        
client_cmd(id"mp3 fadeout 5");
    }
}
#include <amxmodx>
#include <fun>

new WarmupTime 60// Duración del calentamiento en segundos
new WarmupMusic[] = "music/warmup.mp3"// Ruta de la música de calentamiento

public plugin_init()
{
    
register_plugin("warm-up""1.0""a stranger");
    
    
register_clcmd("warmup""cmd_warmup");
}

public 
cmd_warmup(id)
{
    new 
time get_user_weapon(id); // Obtenemos el arma actual del jugador
    
    
if (time == CSW_AWP || time == CSW_AK47 || time == CSW_M4A1)
    {
        
set_task(WarmupTimer1000_id);
        
client_print(idprint_console"¡Calentamiento iniciado!");
        
        
// Reproducir música
        
client_cmd(id"mp3 play "WarmupMusic" 1");
    }
    else
    {
        
client_print(idprint_console"No se puede realizar el calentamiento con esta arma.");
    }
}

public 
WarmupTimer(id)
{
    if (
WarmupTime 0)
    {
        
client_print(idprint_chat"¡Tiempo restante de calentamiento: "WarmupTime" segundos!");
        
WarmupTime--;
        
set_task(WarmupTimer1000_id);
    }
    else
    {
        
client_print(idprint_chat"¡Calentamiento finalizado!");
        
        
// Detener música gradualmente
        
client_cmd(id"mp3 fadeout 5");
    }

Fururasshu is offline
Jhob94
AMX Mod X Donor
Join Date: Jul 2012
Location: Siiiiiiiiuu
Old 09-16-2023 , 00:07   Re: Help me please, error when compiling
Reply With Quote #2

Use search button and learn how to set a task. Everything is wrong there. The warmup time must be a float. You are not setting the task’s function. I have no idea how you managed to do a task like that, it makes no sense at all.
__________________
Jhob94 is offline
lexzor
Veteran Member
Join Date: Nov 2020
Old 09-16-2023 , 07:19   Re: Help me please, error when compiling
Reply With Quote #3

Quote:
Originally Posted by Jhob94 View Post
Use search button and learn how to set a task. Everything is wrong there. The warmup time must be a float. You are not setting the task’s function. I have no idea how you managed to do a task like that, it makes no sense at all.

why should he learn how to set a task if he made a topic in suggestions/ requests?

i would understand if it was scripting help section

but here... this is why this section is created
lexzor is offline
Jhob94
AMX Mod X Donor
Join Date: Jul 2012
Location: Siiiiiiiiuu
Old 09-16-2023 , 09:59   Re: Help me please, error when compiling
Reply With Quote #4

Because there isn’t any request here. He posted a code and a compiling error. This is a scripting help issue.
__________________
Jhob94 is offline
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

Forum Jump


All times are GMT -4. The time now is 06:05.


Powered by vBulletin®
Copyright ©2000 - 2023, vBulletin Solutions, Inc.
Theme made by Freecode