Witam, piszę aktualnie, dla siebie plugin ExpMod pod DeathRun. Na razie kod jest "dziewiczy", gdyż jestem jeszcze troszku zielony. Dobra ale do rzeczy... Podczas kompilowania pojawia się komunikat:
Welcome to the AMX Mod X 1.8.1-300 Compiler.Copyright (c) 1997-2013 ITB CompuPhase, AMX Mod X Team Error: Invalid expression, assumed zero on line 117 Error: Undefined symbol "ShowHud" on line 117 Warning: Loose indentation on line 118 Error: Expected token: "}", but found "-end of file-" on line 122 3 Errors. Could not locate output file D:\Users\*******\Desktop\Pluginy\AMXX\Untitled.amx (compile failed).
Na moje oko w kodzie nie ma żadnego błędu... Co powiecie?
#include <amxmodx> #include <amxmisc> #include <nvault> #define PLUGIN "New Plug-In" #define VERSION "1.0" #define AUTHOR "author" ////////////////////////////////////////////////////////////// new const LEVEL[] = { 0, 30, 58, 130, 163, 166, 281, 292, 377, 387, 470, 482, 523, 569, 649, 684, 741, 792, 798, 868, 930, 1007, 1024, 1099, 1144, 1157, 1202, 1233, 1238, 1338, 1342, 1410, 1429, 1584, 1628, 1631, 1668, 1673, 1762, 1786, 1809, 1952, 1969, 2010, 2111, 2128, 2141, 2141, 2186, 2219, 2386, 2443, 2446, 2516, 2571, 2614, 2615, 2650, 2732, 2815, 2854, 2928, 2936, 2961, 3062, 3117, 3135, 3216, 3224, 3261, 3333, 3407, 3439, 3472, 3504, 3590, 3597, 3621, 3684, 3750, 3835, 3859, 3893, 3919, 3972, 4049, 4126, 4130, 4194, 4253, 4295, 4310, 4368, 4464, 4472, 4510, 4586, 4596, 4668, 4687, 4739, 4819, 4887, 4919, 4954, 5029, 5035, 5110, 5117, 5199, 5215, 5219, 5256, 5379, 5421, 5511, 5512, 5521, 5622, 5647, 5760, 5785, 5788, 5866, 5874, 5919, 5968, 6016, 6036, 6127, 6135, 6256, 6295, 6306, 6320, 6468, 6507, 6534, 6566, 6611, 6652, 6694, 6746, 6774, 6881, 6892, 6917, 7005, 7017, 7036, 7086, 7167, 7213, 7275, 7359, 7407, 7421, 7475, 7499, 7543, 7641, 7707, 7769, 7810, 7820, 7821, 7877, 7981, 8003, 8101, 8124, 8168, 8255, 8303, 8307, 8316, 8444, 8449, 8455, 8504, 8533, 8655, 8659, 8776, 8815, 8846, 8916, 8942, 8991, 9058, 9068, 9146, 9206, 9211, 9306, 9340, 9387, 9406, 9458, 9500, 9505, 9612, 9622, 9652, 9679, 9687, 9876, 9885, 9908, 10016, 10028, 10127, 10159, 10209, 10237, 10242, 10254, 10398, 10404, 10441, 10534, 10562, 10589, 10640, 10713, 10743, 10777, 10827, 10878, 10981, 10995, 11028, 11107, 11171, 11222, 11238, 11313, 11371, 11402, 11456, 11467, 11531, 11566, 11655, 11656, 11680, 11779, 11801, 11831, 11915, 11958, 11985, 12062, 12080, 12097, 12235, 12238, 12279, 12353, 12431, 12462, 12505, 12523, 12573, 12655, 12698, 12736, 12767, 12844, 12888, 12919, 12978, 13027, 13035, 13054, 13098, 13232, 13259, 13296, 13298, 13312, 13356, 13444, 13452, 13524, 13618, 13724, 13738, 13775, 13859, 13876, 13952, 13969, 14037, 14072, 14151, 14189, 14201, 14298, 14308, 14323, 14327, 14357, 14401, 14511, 14611, 14656, 14713, 14771, 14821, 14837, 14914, 14930, 14937, 15013, 15105, 15142, 15145, 15261, 15302, 15341, 15399, 15405, 15460, 15537, 15544, 15567, 15607, 15622, 15628, 15670, 15732, 15777, 15850, 15854, 16063, 16100, 16117, 16193, 16214, 16267, 16300, 16402, 16429, 16449, 16486, 16488, 16553, 16575, 16705, 16739, 16783, 16790, 16927, 16936, 16992, 16994, 17109, 17109, 17123, 17161, 17315, 17359, 17379, 17398, 17516, 17534, 17580, 17622, 17651, 17695, 17704, 17755, 17882, 17886, 17972, 18024, 18087, 18092, 18110, 18135, 18137, 18214, 18369, 18410, 18420, 18501, 18543, 18570, 18645, 18702, 18768, 18787, 18837, 18879, 18931, 18955, 19033, 19055, 19096, 19161, 19247, 19279, 19339, 19340, 19424, 19453, 19510, 19528, 19564, 19680, 19685, 19751, 19822, 19858, 19916, 19957, 20011, 20046, 20090, 20122, 20157, 20197, 20223, 20328, 20399, 20419, 20470, 20507, 20560, 20581, 20660, 20677, 20724, 20756, 20817, 20837, 20933, 20942, 21032, 21057, 21072, 21116, 21117, 21188, 21281, 21350, 21452, 21456, 21490, 21555, 21576, 21680, 21729, 21775, 21816, 21841, 21907, 21964, 21974, 21993, 22056, 22060, 22146, 22236, 22277, 22293, 22405, 22455, 22477, 22509, 22536, 22610, 22679, 22732, 22799, 22814, 22865, 22943, 22979, 23004, 23053, 23069, 23070, 23189, 23211, 23314, 23315, 23370, 23387, 23423, 23505, 23611, 23643, 23682, 23688, 23792, 23813, 23901, 23909, 23926, 23931, 24094, 24130, 24174, 24231, 24259, 24279, 24317, 24400, 24430, 24446, 24525, 24560, 24655, 24670, 24743, 24770, 24793, 24829, 24900, 24999, 25027, 25063, 25141, 25160, 25216, 25245, 25258, 25363, 25392, 25419, 25497, 25584, 25616, 25647, 25694, 25736, 25802, 25860, 25863, 25931, 26014, 26044, 26100, 26140, 26149, 26249, 26258, 26273, 26348, 26436, 26439, 26495, 26510, 26542, 26594, 26601, 26662, 26769, 26828, 26866, 26896, 26999, 27041, 27115, 27157, 27169, 27214, 27243, 27271, 27318, 27453, 27470, 27517, 27538, 27578, 27644, 27676, 27783, 27809, 27860, 27933, 27958, 28014, 28032, 28114, 28149, 28169, 28262, 28285, 28318, 28365, 28413, 28474, 28527, 28581, 28615, 28616, 28652, 28665, 28744 } //////////////////////////////////////////////////////////////////////////// new player_level[33], player_exp[33] ////////////////////////////////////////////////////////////// new save_exp, g_vault ////////////////////////////////////////////////////////////// new exp_za_hs, exp_za_zwykle_zabojstwo, exp_za_przezycie_rundy, exp_za_knife ////////////////////////////////////////////////////////////// new punktysklep[33] new forum ////////////////////////////////////////////////////////////// public plugin_init() { register_plugin(PLUGIN, VERSION, AUTHOR) register_event("DeathMsg", "DeathMsg", "a"); //CVARY save_exp = register_cvar("savexp", "1"); g_vault = nvault_open("ExpMod"); exp_za_hs = register_cvar("exp_hs", "20"); exp_za_knife = register_cvar("exp_knife", "20"); exp_za_zwykle_zabojstwo = register_cvar("exp_normalkill", "20"); exp_za_przezycie_rundy = register_cvar("exp_za_przezycie", "20"); forum = register_cvar("nazwa_forum", "www.nazwa_forum.pl"); //KOMENDY register_clcmd("say /xp", "ShowHud"); register_clcmd("say_team /xp", "ShowHud"); } public DeathMsg(id) { new attacker = read_data( 1 ) //Atakujący new victim = read_data( 2 ) //Ginący new headshot = read_data( 3 ) //Sprawdza HS //////////////Sprawdza czy użył broni i jakiej new clip, ammo, weapon = get_user_weapon(attacker, clip, ammo); player_exp[attacker] += get_pcvar_num(exp_za_zwykle_zabojstwo); if(headshot) player_exp[attacker] += get_pcvar_num(exp_za_hs); if(weapon == CSW_KNIFE) player_exp[attacker] += get_pcvar_num(exp_za_knife); while(player_exp[attacker] >= LEVEL[player_level[attacker]]) { client_print(attacker, print_chat, "[XP] Awansowales na kolejny poziom. Masz teraz %i poziom.", player_level[attacker]) player_level[attacker] += 1 } <-------------------------117 linijka public ShowHud(id) <---------------------118 linijka { set_hudmessage(255, 0, 0, 0.75, 0.01, 0, 6.0, 15.0); show_hudmessage(id, "Poziom: %p^nEXP:%e^nForum:%f", player_level[id], player_exp[id], get_pcvar_num(forum)); } <------------------------------122 linijka
Linijki oznaczone wg tego co jest w AMXX Studio
Użytkownik OpanowanY edytował ten post 22.11.2013 21:44