Skocz do zawartości

Witamy w Nieoficjalnym polskim support'cie AMX Mod X

Witamy w Nieoficjalnym polskim support'cie AMX Mod X, jak w większości społeczności internetowych musisz się zarejestrować aby móc odpowiadać lub zakładać nowe tematy, ale nie bój się to jest prosty proces w którym wymagamy minimalnych informacji.
  • Rozpoczynaj nowe tematy i odpowiedaj na inne
  • Zapisz się do tematów i for, aby otrzymywać automatyczne uaktualnienia
  • Dodawaj wydarzenia do kalendarza społecznościowego
  • Stwórz swój własny profil i zdobywaj nowych znajomych
  • Zdobywaj nowe doświadczenia

Dołączona grafika Dołączona grafika

Guest Message by DevFuse
 

Zdjęcie

[ROZWIĄZANE] Kompilacja


  • Zamknięty Temat jest zamknięty
5 odpowiedzi w tym temacie

#1 FireSort

    Początkujący

  • Użytkownik

Reputacja: -2
Nowy

  • Postów:15
Offline

Napisano 24.10.2011 13:13

Mam problem z kompilacją pluginu, próbowałem zarówno na lokalu jak i na internetowych kompilatorach

A o to kod.
#include <amxmodx>
#include <fakemeta>
new const FLARE_MODEL[] = "models/zombie_plague/v_grenade_flare.mdl";
//new const FLARE_SOUNDS[][] = { "zombie_plague/thunder1.wav", "zombie_plague/thunder2.wav" };
new pcvar_flare_duration;
public plugin_init()
{
	    register_plugin("Smoke Flares", "0.1", "Mini_Midget")
	   
	    pcvar_flare_duration = register_cvar("flare_duration", "60.0")
	   
	    register_forward(FM_SetModel, "fw_setmodel")   
	    register_forward(FM_Think, "fw_think");
}
public plugin_precache()
{
	    engfunc(EngFunc_PrecacheModel, FLARE_MODEL);
	    //for (new i = 0 ; i < sizeof FLARE_SOUNDS ; i++)
	    //	  engfunc(EngFunc_PrecacheSound, FLARE_SOUNDS[i]);
}
public fw_setmodel(ent, model[])
{
			    //Not a valid ent	 or	  Thrower not alive
	    if (!pev_valid(ent) || !is_user_alive(pev(ent, pev_owner))) // not a valid ent
			    return FMRES_IGNORED;
	   
	    new Float: duration = get_pcvar_float(pcvar_flare_duration)
			   
	    if (equali(model,"models/w_smokegrenade.mdl"))
	    {
			    new className[33]
			    pev(ent, pev_classname, className, 32)
			   
			    // Stop smoke grenade from exploding
			    set_pev(ent, pev_nextthink, get_gametime() + duration);
			    //Effects
			    set_pev(ent,pev_effects,EF_BRIGHTLIGHT);
			    fm_set_rendering(ent, kRenderFxGlowShell, 150, 150, 250, kRenderNormal, 16)
			    //Sound
			    //engfunc(EngFunc_EmitSound, ent, CHAN_AUTO, FLARE_SOUNDS[random(sizeof FLARE_SOUNDS)], VOL_NORM, ATTN_NORM, 0, PITCH_NORM);
			   
			    if(equal(className, "weaponbox") || equal(className, "armoury_entity") || equal(className, "grenade"))
		    {
					    engfunc(EngFunc_SetModel, ent, FLARE_MODEL);
					    return FMRES_SUPERCEDE
			    }
	    }
			   
	    return FMRES_IGNORED;
}
public fw_think(ent)
{
			    //Not a valid ent	 or	  Thrower not alive
	    if (!pev_valid(ent) || !is_user_alive(pev(ent, pev_owner))) // not a valid ent
			    return FMRES_IGNORED;
			   
	    static classname[33]
	    pev(ent, pev_classname, classname, sizeof classname - 1);
	    static model[33]
	    pev(ent, pev_model, model, sizeof model - 1);
	   
	    if( equal(model, FLARE_MODEL) && equal(classname, "grenade"))
			    engfunc(EngFunc_RemoveEntity, ent);
			   
	    return FMRES_IGNORED;
}
stock fm_set_rendering(entity, fx = kRenderFxNone, r = 255, g = 255, b = 255, render = kRenderNormal, amount = 16) {
	    new Float:RenderColor[3];
	    RenderColor[2] = float(<img src='https://amxx.pl/public/style_emoticons/<#EMO_DIR#>/cool.png' class='bbc_emoticon' alt='B)' />;
	    RenderColor[0] = float(r);
	    RenderColor[1] = float(g);
	    set_pev(entity, pev_renderfx, fx);
	    set_pev(entity, pev_rendercolor, RenderColor);
	    set_pev(entity, pev_rendermode, render);
	    set_pev(entity, pev_renderamt, float(amount));
	    return 1;
}

przy kompilacji wyskakuje
Welcome to the AMX Mod X 1.8.1-300 Compiler.
Copyright (c) 1997-2006 ITB CompuPhase, AMX Mod X Team
/tmp/textfuJnc0.sma(76) : error 017: undefined symbol "B"
/tmp/textfuJnc0.sma(86) : warning 203: symbol is never used: "b"
1 Error.
Could not locate output file /home/groups/amxmodx/public_html/websc3/textfuJnc0.amx (compile failed).

  • +
  • -
  • 0

#2 Hiroshima

    Godlike

  • Przyjaciel

Reputacja: 1 327
Godlike

  • Postów:4 984
  • Steam:steam
  • Imię:Michał
  • Lokalizacja:Málaga
Offline

Napisano 24.10.2011 13:24

Automatyczna wiadomość


Ten temat został przeniesiony z forum:
AMX Mod XProblemy z pluginami
do
Scripting AMXXProśby o kompilacje pluginów / Problemy z kompilacją


  • +
  • -
  • 0

#3 Hiroshima

    Godlike

  • Przyjaciel

Reputacja: 1 327
Godlike

  • Postów:4 984
  • Steam:steam
  • Imię:Michał
  • Lokalizacja:Málaga
Offline

Napisano 24.10.2011 13:31

proszę:

#include <amxmodx>
#include <fakemeta>
new const FLARE_MODEL[] = "models/zombie_plague/v_grenade_flare.mdl";
//new const FLARE_SOUNDS[][] = { "zombie_plague/thunder1.wav", "zombie_plague/thunder2.wav" };
new pcvar_flare_duration;
public plugin_init()
{
            register_plugin("Smoke Flares", "0.1", "Mini_Midget")

            pcvar_flare_duration = register_cvar("flare_duration", "60.0")

            register_forward(FM_SetModel, "fw_setmodel")   
            register_forward(FM_Think, "fw_think");
}
public plugin_precache()
{
            engfunc(EngFunc_PrecacheModel, FLARE_MODEL);
            //for (new i = 0 ; i < sizeof FLARE_SOUNDS ; i++)
            //    engfunc(EngFunc_PrecacheSound, FLARE_SOUNDS[i]);
}
public fw_setmodel(ent, model[])
{
                            //Not a valid ent    or       Thrower not alive
            if (!pev_valid(ent) || !is_user_alive(pev(ent, pev_owner))) // not a valid ent
                            return FMRES_IGNORED;

            new Float: duration = get_pcvar_float(pcvar_flare_duration)

            if (equali(model,"models/w_smokegrenade.mdl"))
            {
                            new className[33]
                            pev(ent, pev_classname, className, 32)

                            // Stop smoke grenade from exploding
                            set_pev(ent, pev_nextthink, get_gametime() + duration);
                            //Effects
                            set_pev(ent,pev_effects,EF_BRIGHTLIGHT);
                            fm_set_rendering(ent, kRenderFxGlowShell, 150, 150, 250, kRenderNormal, 16)
                            //Sound
                            //engfunc(EngFunc_EmitSound, ent, CHAN_AUTO, FLARE_SOUNDS[random(sizeof FLARE_SOUNDS)], VOL_NORM, ATTN_NORM, 0, PITCH_NORM);

                            if(equal(className, "weaponbox") || equal(className, "armoury_entity") || equal(className, "grenade"))
                    {
                                            engfunc(EngFunc_SetModel, ent, FLARE_MODEL);
                                            return FMRES_SUPERCEDE
                            }
            }

            return FMRES_IGNORED;
}
public fw_think(ent)
{
                            //Not a valid ent    or       Thrower not alive
            if (!pev_valid(ent) || !is_user_alive(pev(ent, pev_owner))) // not a valid ent
                            return FMRES_IGNORED;

            static classname[33]
            pev(ent, pev_classname, classname, sizeof classname - 1);
            static model[33]
            pev(ent, pev_model, model, sizeof model - 1);

            if( equal(model, FLARE_MODEL) && equal(classname, "grenade"))
                            engfunc(EngFunc_RemoveEntity, ent);

            return FMRES_IGNORED;
}
stock fm_set_rendering(entity, fx = kRenderFxNone, r = 255, g = 255, b = 255, render = kRenderNormal, amount = 16) {
            new Float:RenderColor[3];
            RenderColor[2] = float(b);
            RenderColor[0] = float(r);
            RenderColor[1] = float(g);
            set_pev(entity, pev_renderfx, fx);
            set_pev(entity, pev_rendercolor, RenderColor);
            set_pev(entity, pev_rendermode, render);
            set_pev(entity, pev_renderamt, float(amount));
            return 1;
}

http://amxx.pl/kompi...meta></amxmodx>
  • +
  • -
  • 1

#4 FireSort

    Początkujący

  • Autor tematu
  • Użytkownik

Reputacja: -2
Nowy

  • Postów:15
Offline

Napisano 24.10.2011 13:35

Niestety teraz przy kompilacji wyskakuje

Welcome to the AMX Mod X 1.8.1-300 Compiler.
Copyright (c) 1997-2006 ITB CompuPhase, AMX Mod X Team
/tmp/texty1MgEt.sma(69) : error 017: undefined symbol "B"
/tmp/texty1MgEt.sma(70) : error 076: syntax error in the expression, or invalid function call
/tmp/texty1MgEt.sma(70) : error 029: invalid expression, assumed zero
/tmp/texty1MgEt.sma(70) : warning 215: expression has no effect
/tmp/texty1MgEt.sma(77) : warning 203: symbol is never used: "b"
/tmp/texty1MgEt.sma(77) : warning 203: symbol is never used: "r"
3 Errors.
Could not locate output file /home/groups/amxmodx/public_html/websc3/texty1MgEt.amx (compile failed).

  • +
  • -
  • 0

#5 Hiroshima

    Godlike

  • Przyjaciel

Reputacja: 1 327
Godlike

  • Postów:4 984
  • Steam:steam
  • Imię:Michał
  • Lokalizacja:Málaga
Offline

Napisano 24.10.2011 14:13

.sma - http://amxx.pl/kompi...name=plugin.sma
.amxx - http://amxx.pl/kompi...name=plugin.sma

jakoś dziwnie się wkleiło, to już działa
  • +
  • -
  • 1

#6 Hiroshima

    Godlike

  • Przyjaciel

Reputacja: 1 327
Godlike

  • Postów:4 984
  • Steam:steam
  • Imię:Michał
  • Lokalizacja:Málaga
Offline

Napisano 25.10.2011 00:13

Wiadomość wygenerowana automatycznie


Ten temat został zamknięty przez moderatora.

Powód: Pomoc udzielona

Jeśli się z tym nie zgadzasz, Dołączona grafika raportuj ten post, a moderator lub administrator rozpatrzy go ponownie.


Z pozdrowieniami,
Zespół AMXX.PL
  • +
  • -
  • 0




Użytkownicy przeglądający ten temat: 0

0 użytkowników, 0 gości, 0 anonimowych