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] Errory w logach wywoływane przez klasy.


Najlepsza odpowiedź Misiaczek ;c, 18.11.2013 13:23

z Klasy Kapitan usuń

	RegisterHam(Ham_TakeDamage, "player", "TakeDamage");

Z Klasy Doktor

Znajdź:

public MedkitThink(ent)
{
	new id = entity_get_edict(ent, EV_ENT_owner);

Zamień na:

public MedkitThink(ent)
{
	if(!is_valid_ent(ent))
		return PLUGIN_CONTINUE;
	
	new id = entity_get_edict(ent, EV_ENT_owner);

Znajdź:

public client_disconnect(id)
{
	new ent = find_ent_by_class(0, "medkit");
	while(ent > 0)
	{
		if(entity_get_edict(id, EV_ENT_owner) == id)
			remove_entity(ent);
		ent = find_ent_by_class(ent, "medkit");
	}
}

Zamień na:

public client_disconnect(id)
{
	new entApteczki = find_ent_by_class(0, "medkit");
	while(entApteczki > 0)
	{
		if(entity_get_edict(entApteczki, EV_ENT_owner) == id)
			remove_entity(entApteczki);
		entApteczki = find_ent_by_class(entApteczki, "medkit");
	}
}

Znajdź:

	register_event("ResetHUD", "ResetHUD", "abe");

Zamień na

	register_event("ResetHUD", "ResetHUD", "abe");
	register_event("HLTV", "Nowa_Runda", "a", "1=0", "2=0");

Na Końcu SMA dopisz

public Nowa_Runda()
{
	new entApteczka = find_ent_by_class(-1, "medkit");
	while(entApteczka > 0)
	{
		remove_entity(entApteczka);
		entApteczka = find_ent_by_class(entApteczka, "medkit");
	}	
}
Przejdź do postu


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

#1 Dziobak?

    Wszechmogący

  • Power User

Reputacja: 271
Wszechwidzący

  • Postów:645
  • GG:
  • Steam:steam
  • Imię:Michał
  • Lokalizacja:Radom
Offline

Napisano 18.11.2013 09:20

Mam jakieś errory w konsoli i nie umiem tego naprawić może ktoś by pomógł byłbym wdzięczny ;)

 

Konsola :

L 11/18/2013 - 07:21:02: [ENGINE] Invalid entity 79
L 11/18/2013 - 07:21:02: [AMXX] Run time error 10 (plugin "codclass_Doktor.amxx") (native "entity_get_edict") - debug not enabled!
L 11/18/2013 - 07:21:02: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).
L 11/18/2013 - 07:21:02: [ENGINE] Invalid entity 272
L 11/18/2013 - 07:21:02: [AMXX] Run time error 10 (plugin "codclass_Doktor.amxx") (native "entity_get_edict") - debug not enabled!
L 11/18/2013 - 07:21:02: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).
L 11/18/2013 - 07:35:33: Start of error session.
L 11/18/2013 - 07:35:33: Info (map "de_eldorado") (file "addons/amxmodx/logs/error_20131118.log")
L 11/18/2013 - 07:35:33: [HAMSANDWICH] Function TakeDamage not found.
L 11/18/2013 - 07:35:33: [AMXX] Displaying debug trace (plugin "codclass_Kapitan.amxx")
L 11/18/2013 - 07:35:33: [AMXX] Run time error 10: native error (native "RegisterHam")
L 11/18/2013 - 07:35:33: [AMXX]    [0] Untitled.sma::plugin_init (line 32)
L 11/18/2013 - 07:54:29: Start of error session.
L 11/18/2013 - 07:54:29: Info (map "de_dust2_snow") (file "addons/amxmodx/logs/error_20131118.log")
L 11/18/2013 - 07:54:29: [HAMSANDWICH] Function TakeDamage not found.
L 11/18/2013 - 07:54:29: [AMXX] Displaying debug trace (plugin "codclass_Kapitan.amxx")
L 11/18/2013 - 07:54:29: [AMXX] Run time error 10: native error (native "RegisterHam")
L 11/18/2013 - 07:54:29: [AMXX]    [0] Untitled.sma::plugin_init (line 32)
L 11/18/2013 - 07:54:56: Start of error session.

Dopisywałem debug do klasy ale nie pomogło :)

 

Klasy :

 

Załączone pliki


  • +
  • -
  • 0

#2 Misiaczek ;c

    /dev/null

  • Moderator

Reputacja: 1 678
Godlike

  • Postów:2 496
  • GG:
  • Steam:steam
  • Imię:Michał
  • Lokalizacja:Halemba
Offline

Napisano 18.11.2013 13:23   Najlepsza odpowiedź

z Klasy Kapitan usuń

	RegisterHam(Ham_TakeDamage, "player", "TakeDamage");

Z Klasy Doktor

Znajdź:

public MedkitThink(ent)
{
	new id = entity_get_edict(ent, EV_ENT_owner);

Zamień na:

public MedkitThink(ent)
{
	if(!is_valid_ent(ent))
		return PLUGIN_CONTINUE;
	
	new id = entity_get_edict(ent, EV_ENT_owner);

Znajdź:

public client_disconnect(id)
{
	new ent = find_ent_by_class(0, "medkit");
	while(ent > 0)
	{
		if(entity_get_edict(id, EV_ENT_owner) == id)
			remove_entity(ent);
		ent = find_ent_by_class(ent, "medkit");
	}
}

Zamień na:

public client_disconnect(id)
{
	new entApteczki = find_ent_by_class(0, "medkit");
	while(entApteczki > 0)
	{
		if(entity_get_edict(entApteczki, EV_ENT_owner) == id)
			remove_entity(entApteczki);
		entApteczki = find_ent_by_class(entApteczki, "medkit");
	}
}

Znajdź:

	register_event("ResetHUD", "ResetHUD", "abe");

Zamień na

	register_event("ResetHUD", "ResetHUD", "abe");
	register_event("HLTV", "Nowa_Runda", "a", "1=0", "2=0");

Na Końcu SMA dopisz

public Nowa_Runda()
{
	new entApteczka = find_ent_by_class(-1, "medkit");
	while(entApteczka > 0)
	{
		remove_entity(entApteczka);
		entApteczka = find_ent_by_class(entApteczka, "medkit");
	}	
}

  • +
  • -
  • 1

#3 Dziobak?

    Wszechmogący

  • Autor tematu
  • Power User

Reputacja: 271
Wszechwidzący

  • Postów:645
  • GG:
  • Steam:steam
  • Imię:Michał
  • Lokalizacja:Radom
Offline

Napisano 18.11.2013 13:39

Dzięki ziomek.


Użytkownik Busta12 edytował ten post 18.11.2013 13:40

  • +
  • -
  • 0




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

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