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

Błąd kompilacji


  • Zamknięty Temat jest zamknięty
Brak odpowiedzi do tego tematu

#1 SzyjaN

    Zaawansowany

  • Użytkownik

Reputacja: 31
Życzliwy

  • Postów:131
  • GG:
  • Lokalizacja:Katowice
Offline

Napisano 05.04.2011 18:37

Przy próbie kompilacji poniższego .sma wywala mi taki błąd:
compiler\zp_xp_8_human_speed.sma<59> error 008: number of arguments does not match definition


/*================================================================================
Human Test
================================================================================*/

#include <amxmodx>
#include <fakemeta>
#include <zombieplague>
#include <zombiexp>

// Zombie Attributes
new const hclass_name[] = { "Very Health" } // name
new const hclass_info[] = { "Colt and extra health" } // description
new const hclass_model[] = { "" } // model
new const hclass_weapons[] = { WEAPON_M4A1, WEAPON_GLOCK18 } // weapons
const hclass_health = 175 // health
const hclass_speed = 240 // speed
const Float:hclass_gravity = 1.0 // gravity
const hclass_level = 8 // level required to use

// Class IDs
new g_hclassid

// Zombie Classes MUST be registered on plugin_precache
public plugin_precache()
{
	new registerText[32]
	formatex( registerText, sizeof registerText - 1, "[ZPXP] %s human", hclass_name)
	
	register_plugin(registerText, "1.0", "Example")
	
	// Register the new class and store ID for reference
	g_hclassid = zpxp_register_human_class(hclass_name, hclass_info, hclass_model, hclass_weapons, hclass_health, hclass_speed, hclass_gravity, hclass_level)
	
	if(g_hclassid == -1)
	{
		server_print("[ZPXP] You have not properly setup your Zombie XP Mod.");
	}
}

// User Infected forward
public zp_user_infected_post(id, infector)
{
	// Check if the infected player is using our custom zombie class
	if (zp_get_user_human_class(id) != g_hclassid) return;
	
	// Undo any settings we have saved here
	
}

public zp_user_humanized_post(id)
{
	// Check if the infected player is using our custom zombie class
	if (zp_get_user_human_class(id) != g_hclassid) return;

	// User turned human
	if (zp_get_user_survivor(id) == 1)
	{
		// He's survivor, remove any changes made in the plugin
		zp_user_infected_post(id, 1)
	} else {
		zp_round_started_human(id)
	}
}

//This is a forward from zpxp, as opposed to ZPs round_start (which is when infection begins) this is the true beginning of the round
public zp_round_started_human(id)
{
	if (zp_get_user_human_class(id) != g_hclassid) return;
	
	// Set our human's powers!
		
}

Nie za bardzo orientuję się co jest nie tak.. Może mi ktoś pomóc to naprawić + ewentualnie wytłumaczyć o co dokładnie chodzi z tym błędem żebym nie miał z tym problemów na przyszłość? (Tłumaczenie rozumiem lecz nie wiem o który argument chodzi ani na jaki go mam zmienić)
  • +
  • -
  • 0




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

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