Witam!
Stworzyłem za pomocą użytkownika Andrzejek system ulepszania perków. Lecz mam małe problemy podczas kompilacji.
Do silnika dodałem:
poziomy_runy[MAX_ILOSC_RUNY+1][MAX_WIELKOSC_POZIOMU+1]
register_native("cod_get_runa_poziom", "PobierzPoziomRuny", 1);
public PobierzPoziomRuny(runa, Return[], len)
{
if(runa <= ilosc_runy)
{
param_convert(2);
copy(Return, len, poziomy_runy[runa]);
}
}Przykładowy perk:
/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <amxmisc>
#include <codmod>
#include <runy>
#include <hamsandwich>
new const runa_name[] = "Golden";
new const runa_desc[] = "Obrazenia zwiekszone o";
new const runa_poziom[] = "1";
new bool:ma_rune[33];
public plugin_init()
{
register_plugin(runa_name, "0.1", "1stADXionC");
cod_get_register_runa(runa_name, runa_desc, runa_poziom);
RegisterHam(Ham_TakeDamage, "player", "TakeDamage");
}
public cod_get_runa_enabled(id)
{
ma_rune[id] = true;
}
public cod_get_runa_disabled(id)
{
ma_rune[id] = false;
}
public TakeDamage(this, idinflictor, idattacker, Float:damage, damagebits)
{
if(!is_user_connected(idattacker))
return HAM_IGNORED;
if(!ma_rune[idattacker])
{
if(cod_get_runa_poziom() = 1) cod_inflict_damage(idattacker, this, 10.0, 0.00, idinflictor, damagebits);
else if(cod_get_runa_poziom() = 2) cod_inflict_damage(idattacker, this, 10.0, 0.0, idinflictor, damagebits);
else if(cod_get_runa_poziom() = 3) cod_inflict_damage(idattacker, this, 15.0, 0.0, idinflictor, damagebits);
else if(cod_get_runa_poziom() = 4) cod_inflict_damage(idattacker, this, 20.0, 0.0, idinflictor, damagebits);
else if(cod_get_runa_poziom() = 5) cod_inflict_damage(idattacker, this, 25.0, 0.0, idinflictor, damagebits);
}
return HAM_IGNORED;
}Błędy podczas kompilacji perku:
Welcome to the AMX Mod X 1.8.1-300 Compiler. Copyright (c) 1997-2013 ITB CompuPhase, AMX Mod X Team Error: Number of arguments does not match definition on line 41 Warning: Expression has no effect on line 41 Error: Expected token: ";", but found ")" on line 41 Error: Invalid expression, assumed zero on line 41 Error: Too many error messages on one line on line 41 Compilation aborted. 4 Errors. Could not locate output file C:\Users\1stADXionC\Desktop\AleLulaaaa\codruna_golden.amx (compile failed).


Dodatki SourceMod













