Kompilacja klasy błędy
Best Answer kamil323 01.01.2014 12:41
ale chcę na FLagę ADMIN_LEVEL_X
Go to the full postkamil323 01.01.2014
w tych linjkach mam błędy
public TakeDamage(this, idinflictor, idattacker, Float:damage, damagebits)
{
if(!is_user_connected(idattacker))
return HAM_IGNORED;
if(!ma_klase[idattacker])
return HAM_IGNORED;
if(damagebits & DMG_BULLET)
{
new weapon = get_user_weapon(idattacker);
if(weapon == CSW_AWP && damage > 20.0)
cod_inflict_damage(idattacker, this, float(get_user_health(this))-damage+1.0, 0.0,idinflictor, damagebits);
if(weapon == CSW_M4A1) && damage > 20.0 && random_num(1,10) == 1)
cod_inflict_damage(idattacker, this, float(get_user_health(this))-damage+1.0, 0.0, idinflictor, damagebits);
if(weapon == CSW_AK47 && damage > 20.0 && random_num(1,10) == 1)
cod_inflict_damage(idattacker, this, float(get_user_health(this))-damage+1.0, 0.0, idinflictor, damagebits);
}
return HAM_IGNORED;
}
tu błędy przy kompilacj
Welcome to the AMX Mod X 1.8.1-300 Compiler.
Copyright © 1997-2013 ITB CompuPhase, AMX Mod X Team
Warning: Loose indentation on line 199
Warning: Loose indentation on line 201
Error: Invalid expression, assumed zero on line 201
Error: Expected token: ";", but found ")" on line 201
Error: Invalid expression, assumed zero on line 201
Error: Too many error messages on one line on line 201
Compilation aborted.
4 Errors.
Could not locate output file C:\Users\Aśka\Pictures\Perki\sma\codclass_ACE.amx (compile failed).
oraz to tutaj w tych linjka błędy
public cod_class_enabled(id)
{
if(!(get_user_flags(id) & ADMIN_LEVEL_X)
{
ColorChat(id, RED, "[%s] Nie masz uprawnien, aby uzywac tej klasy.", nazwa)
return COD_STOP;
}
ma_klase[id] = true
return COD_CONTINUE
}
a tu błędy z kompilatora
Welcome to the AMX Mod X 1.8.1-300 Compiler.
Copyright © 1997-2013 ITB CompuPhase, AMX Mod X Team
Error: Undefined symbol "ADMIN_LEVEL_X" on line 72
Warning: Loose indentation on line 75
Error: Invalid function or declaration on line 77
Error: Invalid function or declaration on line 78
3 Errors.
Could not locate output file C:\Users\Aśka\Pictures\Perki\sma\codclass_grenadier.amx (compile failed).
Edited by kamil323, 01.01.2014 12:03.
RasiaQ
01.01.2014
ACE się kompiluje
A Grenadier nie kompiluje się dlatego, że nie ma takiej flagi jak ADMIN_LEVEL_X
kamil323 01.01.2014
pokazuje że są Flagi dodatkowe :
ADMIN_FLAG_V - flaga "v"
ADMIN_FLAG_W - flaga "w"
ADMIN_FLAG_X - flaga "x"
ACE sie nie kompiluje błędy z kompilatora na przeglądarce
Welcome to the AMX Mod X 1.8.1-300 Compiler.
Copyright © 1997-2006 ITB CompuPhase, AMX Mod X Team
codclass_ACE.sma(199) : warning 217: loose indentation
codclass_ACE.sma(201) : warning 217: loose indentation
codclass_ACE.sma(201) : error 029: invalid expression, assumed zero
codclass_ACE.sma(201) : error 001: expected token: ";", but found ")"
codclass_ACE.sma(201) : error 029: invalid expression, assumed zero
codclass_ACE.sma(201) : fatal error 107: too many error messages on one line
Compilation aborted.
4 Errors.
a na amxxstudio to Samo
Edited by kamil323, 01.01.2014 12:26.
RasiaQ
01.01.2014
Teraz powinno działać.
http://amxx.pl/topic/60353-flagi/
Żeby używać tej flagi trzeba dodać w .sma
#define ADMIN_FLAG_X (1<<23)
Attached Files
RasiaQ
01.01.2014
Sprawdź ACE'a
Zmien tylko sobie:
@EDIT
Nie wiem, klasa była dziwnie napisana, nie umiałem jej naprawić (nie miała dodanych cichych kroków). Napisałem od nowa.
if(!(get_user_flags(id) & ADMIN_LEVEL_H))
Attached Files
Edited by RasiaQ, 01.01.2014 12:40.