Pagalbos del error 017: undefined symbol "id"

Forumas skirtas spręsti problemas iškilusias su CS 1.6 serveriais.
Post Reply
luxuks
Jau po truputį tampa savu
Posts: 186
Joined: 2014 Jun 18 17:20
Skype: lukas.luxuks

Pagalbos del error 017: undefined symbol "id"

Post by luxuks »

Sveiki, taigi po puses metu sugalvojau vel koki nors cs serveriuka pakurt ir va radau plugina kokio man ir reikia bet kai bandziau pasidaryt ji pagal save man ismete errora. Bandziau visaip patvarkyt bet vis kaskaip neiseina nors ir zinau kad cia labai lengva sutvarkyt. Prasau jusu pagalbos.

Pluginas:

Code: Select all

#include <amxmisc> // We only need amxmisc for this.. #pragma semicolon 1 // Why not native hnsxp_get_user_xp(id); // Get the HnsXP-xp.native hnsxp_set_user_xp(id, xp); // Set the Hns-xp. new pcvar_xp; // Pcvar public plugin_init() {register_plugin("XP-Boost (VIP)", "1.0.0", "Ex1ne"); // Registering plugin (Optinal)register_event("DeathMsg", "eDeath", "a"); // Register the deathmsg event to catch a kill.pcvar_xp = register_cvar("xpb_vip", "50"); // Pcvar for the xp-boost} public cDeath(){if(read_data(1) /*Killer*/ == read_data(2) /*Victim*/) // To check if it was a suicide.{return PLUGIN_HANDLED;}if(get_user_flags(id) & ADMIN_LEVEL_H)(read_data(1) /*Killer*/)) // Check if the killer is VIP.{hnsxp_set_user_xp(read_data(1), hnsxp_get_user_xp(read_data(1)) + get_pcvar_num(pcvar_xp)); // Add the xpreturn PLUGIN_HANDLED;}return PLUGIN_HANDLED;}
O cia va erroras

Code: Select all

Welcome to the AMX Mod X 1.8.1-300 Compiler.Copyright (c) 1997-2013 ITB CompuPhase, AMX Mod X Team xp.sma(22) : error 017: undefined symbol "id"xp.sma(22) : error 001: expected token: ";", but found ")"xp.sma(22) : error 029: invalid expression, assumed zeroxp.sma(22) : fatal error 107: too many error messages on one line Compilation aborted.4 Errors.Could not locate output file xp.amx (compile failed).
Iskart sakau aciu uz pagalba.

User avatar
laimiukas3
Moderatorius
Posts: 4569
Joined: 2012 Aug 03 01:12
Skype: laimiukas3
Location: Vilnius
Contact:

Re: Pagalbos del error 017: undefined symbol "id"

Post by laimiukas3 »

luxuks wrote:Sveiki, taigi po puses metu sugalvojau vel koki nors cs serveriuka pakurt ir va radau plugina kokio man ir reikia bet kai bandziau pasidaryt ji pagal save man ismete errora. Bandziau visaip patvarkyt bet vis kaskaip neiseina nors ir zinau kad cia labai lengva sutvarkyt. Prasau jusu pagalbos.

Pluginas:

Code: Select all

#include <amxmisc> // We only need amxmisc for this.. #pragma semicolon 1 // Why not native hnsxp_get_user_xp(id); // Get the HnsXP-xp.native hnsxp_set_user_xp(id, xp); // Set the Hns-xp. new pcvar_xp; // Pcvar public plugin_init() {register_plugin("XP-Boost (VIP)", "1.0.0", "Ex1ne"); // Registering plugin (Optinal)register_event("DeathMsg", "eDeath", "a"); // Register the deathmsg event to catch a kill.pcvar_xp = register_cvar("xpb_vip", "50"); // Pcvar for the xp-boost} public cDeath(){if(read_data(1) /*Killer*/ == read_data(2) /*Victim*/) // To check if it was a suicide.{return PLUGIN_HANDLED;}if(get_user_flags(id) & ADMIN_LEVEL_H)(read_data(1) /*Killer*/)) // Check if the killer is VIP.{hnsxp_set_user_xp(read_data(1), hnsxp_get_user_xp(read_data(1)) + get_pcvar_num(pcvar_xp)); // Add the xpreturn PLUGIN_HANDLED;}return PLUGIN_HANDLED;}
O cia va erroras

Code: Select all

Welcome to the AMX Mod X 1.8.1-300 Compiler.Copyright (c) 1997-2013 ITB CompuPhase, AMX Mod X Team xp.sma(22) : error 017: undefined symbol "id"xp.sma(22) : error 001: expected token: ";", but found ")"xp.sma(22) : error 029: invalid expression, assumed zeroxp.sma(22) : fatal error 107: too many error messages on one line Compilation aborted.4 Errors.Could not locate output file xp.amx (compile failed).
Iskart sakau aciu uz pagalba.
o numesk kur ne pagal save darai :) gal kompiletoriu pamegink naujesni panaudoti koki 1.8.3 http://www.amxmodx.org/snapshots.php cia zinoma priklauso koks pas tave amxmodx stovi serveri :) nes dauguma nauju amxx pluginu neveikia ir nesikompiliuoja ant senu kompiletoriu Welcome to the AMX Mod X 1.8.1-300 Compiler. kaip matau pas tave
Image
Image
Image

luxuks
Jau po truputį tampa savu
Posts: 186
Joined: 2014 Jun 18 17:20
Skype: lukas.luxuks

Re: Pagalbos del error 017: undefined symbol "id"

Post by luxuks »

Va pilnas pluginas trauktas is http://www.amxmodx.lt/viewtopic.php?f=16&t=5416

Noreciau kad sitas pluginas veiktu be vip manager o tik pagal flaga, buvau jau taip pasidares bet kai puse metu cs nei losiau nei kuriau kaska tai ir dingo kaskur tie pluginai.

Code: Select all

#include <amxmisc> // We only need amxmisc for this.. #pragma semicolon 1 // Why not native is_user_vip(id); // Get the Vip-Manager check.native hnsxp_get_user_xp(id); // Get the HnsXP-xp.native hnsxp_set_user_xp(id, xp); // Set the Hns-xp. new pcvar_xp; // Pcvar public plugin_init() {    register_plugin("XP-Boost (VIP)", "1.0.0", "Ex1ne"); // Registering plugin (Optinal)    register_event("DeathMsg", "eDeath", "a"); // Register the deathmsg event to catch a kill.    pcvar_xp = register_cvar("xpb_vip", "50"); // Pcvar for the xp-boost} public cDeath(){    if(read_data(1) /*Killer*/ == read_data(2) /*Victim*/) // To check if it was a suicide.    {        return PLUGIN_HANDLED;    }    if(is_user_vip(read_data(1) /*Killer*/)) // Check if the killer is VIP.    {        hnsxp_set_user_xp(read_data(1), hnsxp_get_user_xp(read_data(1)) + get_pcvar_num(pcvar_xp)); // Add the xp        return PLUGIN_HANDLED;    }    return PLUGIN_HANDLED;} 

User avatar
hleV
AMX Mod X ekspertai
Posts: 875
Joined: 2011 Apr 02 11:23
Skype: hlev.lt
Location: Šiauliai

Re: Pagalbos del error 017: undefined symbol "id"

Post by hleV »

cDeath() callback'e nėra apsirašytas id. Tau reikia jį arba apsirašyt (ką ir rekomenduočiau padaryt) arba vietoj jo naudot read_data(1). Apsirašymas paprastas: new id = read_data(1);.
Image ← RIP best userbar
DISKUSIJA: KIETAS PLUGIN'O UŽSAKOVAS
Privačios pagalbos neteikiu!

luxuks
Jau po truputį tampa savu
Posts: 186
Joined: 2014 Jun 18 17:20
Skype: lukas.luxuks

Re: Pagalbos del error 017: undefined symbol "id"

Post by luxuks »

Aciu uz pagalba, lyg ir compilina veliau isbandysiu.

FrankJScott
Gana aktyvus vartotojas
Posts: 421
Joined: 2024 Apr 04 22:28
Skype: asfasf

Updated Product Tips

Post by FrankJScott »

Please try Google before asking about Best Product Blog 3ddbf48

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest