c4_timer

Статус
В этой теме нельзя размещать новые ответы.
Сообщения
79
Реакции
1
Ошибка
AMX Mod X Compiler 1.9.0.5271
Copyright (c) 1997-2006 ITB CompuPhase
Copyright (c) 2004-2013 AMX Mod X Team

/hlds/web/www/amxxpc/bin/amxx-1.9.0/include/dhudmessage.inc(19) : error 021: symbol already defined: "set_dhudmessage"
/hlds/web/www/amxxpc/bin/amxx-1.9.0/include/dhudmessage.inc(24) : error 010: invalid function or declaration
/hlds/web/www/amxxpc/bin/amxx-1.9.0/include/dhudmessage.inc(34) : error 010: invalid function or declaration
/hlds/web/www/amxxpc/bin/amxx-1.9.0/include/dhudmessage.inc(37) : error 021: symbol already defined: "show_dhudmessage"
/hlds/web/www/amxxpc/bin/amxx-1.9.0/include/dhudmessage.inc(42) : error 010: invalid function or declaration
/hlds/web/www/amxxpc/bin/amxx-1.9.0/include/dhudmessage.inc(44) : warning 218: old style prototypes used with optional semicolumns
/hlds/web/www/amxxpc/bin/amxx-1.9.0/include/dhudmessage.inc(45) : error 054: unmatched closing brace
/hlds/web/www/amxxpc/bin/amxx-1.9.0/include/dhudmessage.inc(46) : error 010: invalid function or declaration
/hlds/web/www/amxxpc/bin/amxx-1.9.0/include/dhudmessage.inc(49) : warning 218: old style prototypes used with optional semicolumns
/hlds/web/www/amxxpc/bin/amxx-1.9.0/include/dhudmessage.inc(50) : error 054: unmatched closing brace
/hlds/web/www/amxxpc/bin/amxx-1.9.0/include/dhudmessage.inc(51) : error 010: invalid function or declaration
/hlds/web/www/amxxpc/bin/amxx-1.9.0/include/dhudmessage.inc(54) : error 021: symbol already defined: "get_players"
/hlds/web/www/amxxpc/bin/amxx-1.9.0/include/dhudmessage.inc(56) : error 010: invalid function or declaration
/hlds/web/www/amxxpc/bin/amxx-1.9.0/include/dhudmessage.inc(58) : error 010: invalid function or declaration
/hlds/web/www/amxxpc/bin/amxx-1.9.0/include/dhudmessage.inc(63) : error 010: invalid function or declaration
/hlds/web/www/amxxpc/bin/amxx-1.9.0/include/dhudmessage.inc(65) : error 010: invalid function or declaration
/hlds/web/www/amxxpc/bin/amxx-1.9.0/include/dhudmessage.inc(67) : error 010: invalid function or declaration
/hlds/web/www/amxxpc/bin/amxx-1.9.0/include/dhudmessage.inc(70) : error 010: invalid function or declaration
/hlds/web/www/amxxpc/bin/amxx-1.9.0/include/dhudmessage.inc(79) : error 010: invalid function or declaration
/hlds/web/www/amxxpc/bin/amxx-1.9.0/include/dhudmessage.inc(82) : warning 218: old style prototypes used with optional semicolumns
/hlds/web/www/amxxpc/bin/amxx-1.9.0/include/dhudmessage.inc(83) : error 054: unmatched closing brace
/hlds/web/www/amxxpc/bin/amxx-1.9.0/include/dhudmessage.inc(84) : error 010: invalid function or declaration
/hlds/web/www/amxxpc/bin/amxx-1.9.0/include/dhudmessage.inc(86) : error 010: invalid function or declaration
/hlds/web/www/amxxpc/bin/amxx-1.9.0/include/dhudmessage.inc(90) : error 010: invalid function or declaration
/hlds/web/www/amxxpc/bin/amxx-1.9.0/include/dhudmessage.inc(95) : error 021: symbol already defined: "vformat"
/hlds/web/www/amxxpc/bin/amxx-1.9.0/include/dhudmessage.inc(96) : warning 218: old style prototypes used with optional semicolumns
/hlds/web/www/amxxpc/bin/amxx-1.9.0/include/dhudmessage.inc(97) : error 054: unmatched closing brace
/hlds/web/www/amxxpc/bin/amxx-1.9.0/include/dhudmessage.inc(100) : error 021: symbol already defined: "ArrayDestroy"
/hlds/web/www/amxxpc/bin/amxx-1.9.0/include/dhudmessage.inc(103) : error 010: invalid function or declaration
/hlds/web/www/amxxpc/bin/amxx-1.9.0/include/dhudmessage.inc(106) : error 025: function heading differs from prototype

Compilation aborted.
26 Errors.
Done.
Компилятор
Локальный
Amx Mod X
1.9.0
Исходный код
#include <amxmodx>
#include <csx>
#include <dhudmessage>

#define PLUGIN "Bomb HUD Timer"
#define VERSION "0.2"
#define AUTHOR "Twe3k"

new g_c4timer, pointnum;
new bool:b_planted = false;

new g_msgsync;


public plugin_init()
{
register_plugin(PLUGIN,VERSION,AUTHOR);

pointnum = get_cvar_pointer("mp_c4timer");

register_logevent("newRound", 2, "1=Round_Start");
register_logevent("endRound", 2, "1=Round_End");
register_logevent("endRound", 2, "1&Restart_Round_");

g_msgsync = CreateHudSyncObj();
}

public newRound()
{
g_c4timer = -1;
remove_task(652450);
b_planted = false;
}

public endRound()
{
g_c4timer = -1;
remove_task(652450);
}

public bomb_planted()
{
b_planted = true;
g_c4timer = get_pcvar_num(pointnum);
dispTime()
set_task(1.0, "dispTime", 652450, "", 0, "b");
}

public bomb_defused()
{
if(b_planted)
{
remove_task(652450);
b_planted = false;
}

}

public bomb_explode()
{
if(b_planted)
{
remove_task(652450);
b_planted = false;
}

}

public dispTime()
{
if(!b_planted)
{
remove_task(652450);
return;
}


if(g_c4timer >= 0)
{
if(g_c4timer > 13) set_dhudmessage(0, 255, 0, -1.0, 0.80, 0, 1.0, 1.0, 0.01, 0.01, -1);
else if(g_c4timer > 7) set_dhudmessage(0, 255, 0, -1.0, 0.80, 0, 1.0, 1.0, 0.01, 0.01, -1);
else set_dhudmessage(0, 255, 0, -1.0, 0.80, 0, 1.0, 1.0, 0.01, 0.01, -1);

show_dhudmessage(0,"Бомба ёбнет через: %d секунд", g_c4timer);

--g_c4timer;
}

}
Не могу самостоятельно исправить.
 
В этой теме было размещено решение! Перейти к решению.
Сообщения
3,256
Реакции
1,436
Помог
121 раз(а)
Убери #include <dhudmessage>
 
Сообщения
79
Реакции
1
AMX Mod X Compiler 1.9.0.5271
Copyright (c) 1997-2006 ITB CompuPhase
Copyright (c) 2004-2013 AMX Mod X Team

/hlds/web/www/amxxpc/work/scripting/202104/1612029318/c4_timer.sma(81) : error 088: number of arguments does not match definition
/hlds/web/www/amxxpc/work/scripting/202104/1612029318/c4_timer.sma(82) : error 088: number of arguments does not match definition
/hlds/web/www/amxxpc/work/scripting/202104/1612029318/c4_timer.sma(83) : error 088: number of arguments does not match definition
/hlds/web/www/amxxpc/work/scripting/202104/1612029318/c4_timer.sma(26) : warning 204: symbol is assigned a value that is never used: "g_msgsync"

3 Errors.
Could not locate output file /hlds/web/www/amxxpc/work/plugins/202104/1612029318/c4_timer.amx (compile failed).
 
Сообщения
3,256
Реакции
1,436
Помог
121 раз(а)
Убери последний аргумент в функциях на этих строках.
 
Сообщения
79
Реакции
1
AMX Mod X Compiler 1.9.0.5271
Copyright (c) 1997-2006 ITB CompuPhase
Copyright (c) 2004-2013 AMX Mod X Team

/hlds/web/www/amxxpc/work/scripting/202104/1612031122/c4_timer.sma(77) : error 088: number of arguments does not match definition
/hlds/web/www/amxxpc/work/scripting/202104/1612031122/c4_timer.sma(78) : error 088: number of arguments does not match definition
/hlds/web/www/amxxpc/work/scripting/202104/1612031122/c4_timer.sma(79) : error 088: number of arguments does not match definition

3 Errors.
Could not locate output file /hlds/web/www/amxxpc/work/plugins/202104/1612031122/c4_timer.amx (compile failed).
 
Сообщения
3,256
Реакции
1,436
Помог
121 раз(а)
Mizer, код покажи.

Код:
// Header size:            532 bytes
// Code size:             1444 bytes
// Data size:              964 bytes
// Stack/heap size:      16384 bytes
// Total requirements:   19324 bytes
//
// 1 Warning.
// Done.
//
// Compilation Time: 0,12 sec
// ----------------------------------------
 
Сообщения
79
Реакции
1
Код:
#include <amxmodx>
#include <csx>
// #include <dhudmessage>
 
#define PLUGIN "Bomb HUD Timer"
#define VERSION "0.2"
#define AUTHOR "Twe3k"
 
new g_c4timer, pointnum;
new bool:b_planted = false;


public plugin_init()
{
    register_plugin(PLUGIN,VERSION,AUTHOR);
 
    pointnum = get_cvar_pointer("mp_c4timer");
 
    register_logevent("newRound", 2, "1=Round_Start");
    register_logevent("endRound", 2, "1=Round_End");
    register_logevent("endRound", 2, "1&Restart_Round_");
 
}
 
public newRound()
{
    g_c4timer = -1;
    remove_task(652450);
    b_planted = false;
}
 
public endRound()
{
    g_c4timer = -1;
    remove_task(652450);
}
 
public bomb_planted()
{
    b_planted = true;
    g_c4timer = get_pcvar_num(pointnum);
    dispTime()
    set_task(1.0, "dispTime", 652450, "", 0, "b");
}
 
public bomb_defused()
{
    if(b_planted)
    {
        remove_task(652450);
        b_planted = false;
    }
    
}
 
public bomb_explode()
{
    if(b_planted)
    {
        remove_task(652450);
        b_planted = false;
    }
    
}
 
public dispTime()
{   
    if(!b_planted)
    {
        remove_task(652450);
        return;
    }
        
 
    if(g_c4timer >= 0)
    {
        if(g_c4timer > 13) set_dhudmessage(0, 255, 0, -1.0, 0.80, 0, 1.0, 1.0, 0.01, 0.01, -1);
        else if(g_c4timer > 7) set_dhudmessage(0, 255, 0, -1.0, 0.80, 0, 1.0, 1.0, 0.01, 0.01, -1);
        else set_dhudmessage(0, 255, 0, -1.0, 0.80, 0, 1.0, 1.0, 0.01, 0.01, -1);
 
        show_dhudmessage(0,"Бомба ёбнет через: %d секунд", g_c4timer);
 
        --g_c4timer;
    }
 
}
 
Сообщения
3,256
Реакции
1,436
Помог
121 раз(а)
  • Нравится
Реакции: Ayk
Сообщения
79
Реакции
1
AMX Mod X Compiler 1.9.0.5271
Copyright (c) 1997-2006 ITB CompuPhase
Copyright (c) 2004-2013 AMX Mod X Team

/hlds/web/www/amxxpc/work/scripting/202104/1612032102/c4_timer.sma(78) : error 088: number of arguments does not match definition
/hlds/web/www/amxxpc/work/scripting/202104/1612032102/c4_timer.sma(79) : error 088: number of arguments does not match definition

2 Errors.
Could not locate output file /hlds/web/www/amxxpc/work/plugins/202104/1612032102/c4_timer.amx (compile failed).
 
Статус
В этой теме нельзя размещать новые ответы.

Пользователи, просматривающие эту тему

Сейчас на форуме нет ни одного пользователя.
Сверху Снизу