Witam otóż wziąłem kod z tego tematu: http://amxx.pl/topic...zach-z-druzyny/ , jestem początkujący z pawnem wcześniej jedynie C++ podstawy. Dlatego też proszę o pomoc:
/* Plugin do sprawdzania odleglosci miedzy graczami */
#include
#include
#include
#include
#define PLUGIN "xxx"
#define VERSION "1.0"
#define AUTHOR "xxx"
#define MAX_DISTANCE
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
// Add your code here...
}
public lol () {
new iPlayers[32], iNum, iPlayer, Float:flDist, Float:fOrigin[2][3];
get_players(iPlayers, iNum, "ahe", (get_user_team(id) == 2 ? "TERRORIST" : "CT"));
for(new i = 0; i < iNum; i++){
iPlayer = iPlayers[i];
pev(iPlayer, pev_origin, fOrigin[0]);
pev(id, pev_origin, fOrigin[1]) ;
flDist = get_distance_f(fOrigin[0], fOrigin[1]);
//if(flDist <= MAX_DISTANCE){
// wykonaj kod na graczu
//}
}
Welcome to the AMX Mod X 1.8.1-300 Compiler.
Copyright © 1997-2006 ITB CompuPhase, AMX Mod X Team
Error: Undefined symbol "id" on line 25
Warning: Loose indentation on line 26
Warning: Loose indentation on line 29
Error: Undefined symbol "id" on line 30
Warning: Expression has no effect on line 30
Warning: Expression has no effect on line 30
Error: Expected token: ";", but found ")" on line 30
Error: Invalid expression, assumed zero on line 30
Error: Too many error messages on one line on line 30
Compilation aborted.
5 Errors.
Could not locate output file C:\Users\aaa\Desktop\aaa.amx (compile failed).
Powiedzcie Panowie, co ja robię nie tak?