Raised This Month: $ Target: $400
 0% 

Getting loads of errors when trying to find a entity


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
RollerBlades
Senior Member
Join Date: Feb 2011
Location: Sweden
Old 06-24-2011 , 10:05   Getting loads of errors when trying to find a entity
Reply With Quote #1

gives me several random errors when trying to compile a plug-in with this piece of code

PHP Code:
                case 9// Shotty
                
{
                    if ( 
get_user_health(id) > 50 )
                    {
                        
client_print(idprint_center"[AMXX] Bought Shotty");
                        
sh_give_weapon(idCSW_XM1014true);
                        
extrashottydmg[id] = true;
                        
set_user_health(idget_user_health(id) - 50);
                        
                        new 
iEnt = -1;
                        while ( ( 
iEnt find_entity_by_owner(iEnt"weapon_xm1014"id0) ) );
                        {
                            new 
szClassname[33];
                            
pev(iEntpev_classnameszClassname32);
                            
                            if (
equali(szClassname"weapon_xm1014"))
                            {
                                
sh_set_rendering(iEnt02250100kRenderFxGlowShellkRenderTransAlpha);
                            }
                    }
                    else 
                    {
                        
client_print(idprint_center"[AMXX] You Don't Have Enough Health To Sacrifice!");
                        
menu_destroy(shopmenu);
                        return 
PLUGIN_HANDLED;
                    } 
when i remove the entity it doent give over 20 random errors

Code:
//AMXXPC compile.exe
// by the AMX Mod X Dev Team


//// weaponmenu.sma
// C:\addons\amxmodx\scripting\weaponmenu.sma(286) : warning 217: loose indentat
ion
// C:\addons\amxmodx\scripting\weaponmenu.sma(290) : warning 217: loose indentat
ion
// C:\addons\amxmodx\scripting\weaponmenu.sma(291) : error 017: undefined symbol
 "find_entity_by_owner"
// C:\addons\amxmodx\scripting\weaponmenu.sma(291) : error 036: empty statement
// C:\addons\amxmodx\scripting\weaponmenu.sma(294) : warning 217: loose indentat
ion
// C:\addons\amxmodx\scripting\weaponmenu.sma(296) : warning 217: loose indentat
ion
// C:\addons\amxmodx\scripting\weaponmenu.sma(301) : warning 217: loose indentat
ion
// C:\addons\amxmodx\scripting\weaponmenu.sma(301) : error 029: invalid expressi
on, assumed zero
// C:\addons\amxmodx\scripting\weaponmenu.sma(304) : warning 217: loose indentat
ion
// C:\addons\amxmodx\scripting\weaponmenu.sma(309) : warning 217: loose indentat
ion
// C:\addons\amxmodx\scripting\weaponmenu.sma(309) : error 029: invalid expressi
on, assumed zero
// C:\addons\amxmodx\scripting\weaponmenu.sma(311) : warning 217: loose indentat
ion
// C:\addons\amxmodx\scripting\weaponmenu.sma(315) : warning 217: loose indentat
ion
// C:\addons\amxmodx\scripting\weaponmenu.sma(315) : error 029: invalid expressi
on, assumed zero
// C:\addons\amxmodx\scripting\weaponmenu.sma(315) : error 017: undefined symbol
 "join_team"
// C:\addons\amxmodx\scripting\weaponmenu.sma(322) : error 017: undefined symbol
 "show_message"
// C:\addons\amxmodx\scripting\weaponmenu.sma(327) : warning 225: unreachable co
de
// C:\addons\amxmodx\scripting\weaponmenu.sma(327) : error 017: undefined symbol
 "show_message"
// C:\addons\amxmodx\scripting\weaponmenu.sma(341) : error 029: invalid expressi
on, assumed zero
// C:\addons\amxmodx\scripting\weaponmenu.sma(341) : error 017: undefined symbol
 "super_grenade"
// C:\addons\amxmodx\scripting\weaponmenu.sma(343) : warning 209: function "menu
_handler" should return a value
// C:\addons\amxmodx\scripting\weaponmenu.sma(378) : error 029: invalid expressi
on, assumed zero
// C:\addons\amxmodx\scripting\weaponmenu.sma(378) : error 017: undefined symbol
 "enchanted_tracer"
// C:\addons\amxmodx\scripting\weaponmenu.sma(380) : warning 209: function "menu
_handler" should return a value
// C:\addons\amxmodx\scripting\weaponmenu.sma(411) : error 029: invalid expressi
on, assumed zero
// C:\addons\amxmodx\scripting\weaponmenu.sma(411) : error 004: function "sh_cli
ent_spawn" is not implemented
// C:\addons\amxmodx\scripting\weaponmenu.sma(417) : error 029: invalid expressi
on, assumed zero
// C:\addons\amxmodx\scripting\weaponmenu.sma(417) : error 004: function "sh_rou
nd_new" is not implemented
// C:\addons\amxmodx\scripting\weaponmenu.sma(418) : warning 217: loose indentat
ion
// C:\addons\amxmodx\scripting\weaponmenu.sma(420) : warning 217: loose indentat
ion
// C:\addons\amxmodx\scripting\weaponmenu.sma(420) : error 029: invalid expressi
on, assumed zero
// C:\addons\amxmodx\scripting\weaponmenu.sma(420) : error 017: undefined symbol
 "revive"
// C:\addons\amxmodx\scripting\weaponmenu.sma(420) : error 017: undefined symbol
 "cid"
// C:\addons\amxmodx\scripting\weaponmenu.sma(420) : fatal error 107: too many e
rror messages on one line
//
// Compilation aborted.
// 20 Errors.
// Could not locate output file C:\addons\amxmodx\scripting\compiled\weaponmenu.
amx (compile failed).
//
// Compilation Time: 0,33 sec
// ----------------------------------------

Press enter to exit ...


Last edited by RollerBlades; 06-24-2011 at 14:05.
RollerBlades is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 06-24-2011 , 11:38   Re: Getting loads of errors when trying to find a entity
Reply With Quote #2

So post the errors.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
RollerBlades
Senior Member
Join Date: Feb 2011
Location: Sweden
Old 06-24-2011 , 13:52   Re: Getting loads of errors when trying to find a entity
Reply With Quote #3

like i said the errors are random they have nothing to do with the entity stuff though the entity stuff is whats causing thoose errors... i know it didnt really help i just wanted to explain... the problem is in the code above i just cant find what causes it to happen

posted the errors above


Last edited by RollerBlades; 06-24-2011 at 14:05.
RollerBlades is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 06-24-2011 , 14:19   Re: Getting loads of errors when trying to find a entity
Reply With Quote #4

Now you'll have to post the whole code so we can find what's causing those errors.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
RollerBlades
Senior Member
Join Date: Feb 2011
Location: Sweden
Old 06-24-2011 , 14:23   Re: Getting loads of errors when trying to find a entity
Reply With Quote #5

well, its just some random f*cked up coding


PHP Code:
// Menu - Basics 
 
#define M3+BOW_MULT 3.0    // damage multiplier for Ultimate M3 % admin only and Enchanted Bow % free for all.
#define HEMULT 4.0         // damage multiplier for Super HE % admin only.
#define SHOTTYMULT 4.0     //  damage multiplier for Shotty % free for all.
 
#include <superheromod>
#include <dhudmessage>
#include <chatcolor>
#include <amxmisc>
 
#define AMMOX_HEGRENADE 12
 
enum _:ITEM_HANDLER // Easier to read and handle...
    
WpnSet1 3000,
    
WpnSet2 2800,
    
WpnSet3 4000,
    
WpnSet4 6000,
    
WpnSet5 5000,
    
Enchanted_Weapon 16000,
    
Super_HE 0,
    
Ultimate_M3 0,
    
Random_Gift 0,
    
Shotty 13000
};   
 
new 
bool:grenadetrail[SH_MAXSLOTS+1];
new 
bool:bowtrail[SH_MAXSLOTS+1];
new 
bool:extradmg[SH_MAXSLOTS+1]; 
new 
bool:extrafragdmg[SH_MAXSLOTS+1];
new 
bool:extrashottydmg[SH_MAXSLOTS+1];
new 
gMessageShown[SH_MAXSLOTS+1];
new 
g_RandomUsed[SH_MAXSLOTS+1];
new 
gTrailgBowTrailg_pReviveCost;
 
new const 
itemcost[ITEM_HANDLER];
new const 
HEGrenade[] = "models/w_hegrenade.mdl";
 
public 
plugin_init()
{    
    
register_plugin("WeaponMenu""1.0""RB");
 
    
g_pReviveCost register_cvar("revive_cost""7000"); // how much it costs to revive yourself % admin only.
 
    
register_clcmd("say /buy""cmd_menu");
    
register_clcmd("say /revive""revive"ADMIN_LEVEL_C);
    
register_clcmd("say_team /buy""cmd_menu");
    
register_clcmd("say_team /revive""revive"ADMIN_LEVEL_C);
 
    
register_event("AmmoX""super_grenade""b");
 
    
register_event("CurWeapon""enchanted_tracer""be""1=1""3>0");
 
    
register_event"TeamInfo""join_team""a");
    
register_event"DeathMsg""show_DeathMsg""a""1>0");
}
 
public 
plugin_precache()
{
    
gTrail precache_model("sprites/zbeam5.spr");
    
gBowTrail precache_model("sprites/laserbeam.spr");
}
 
public 
client_damage(attackeriddamageweaponbodypart)  
{
    if ( !
sh_is_active() || !is_user_alive(id) || !is_user_connected(attacker) ) return;
 
    new 
headshot bodypart == 0;
 
    if ( 
extradmg[attacker] && (1<<weapon) & (1<<CSW_M3)|(1<<CSW_SCOUT) )
    {
        
// do extra damage
        
new extraDamage floatround(damage M3+BOW_MULT damage);
        if (
extraDamage 0sh_extra_damage(idattackerextraDamage"Ultimate M3 & Enchanted Bow"headshot);
    }
 
    if ( 
extrafragdmg[attacker] && weapon == CSW_HEGRENADE )
    {
        
// do extra damage
        
new extraDamage floatround(damage HEMULT damage);
        if (
extraDamage 0sh_extra_damage(idattackerextraDamage"Super HE"headshot);
        
extrafragdmg[attacker] = false;        //we only want the extra dmg to work on our one nade
    
}
 
    if ( 
extrashottydmg[attacker] && weapon == CSW_XM1014 )
    {
        
// do extra damage
        
new extraDamage floatround(damage SHOTTYMULT damage);
        if (
extraDamage 0sh_extra_damage(idattackerextraDamage"Shotty"headshot);
    }
}
 
/*======================================================================
DAMAGE MULT OPTIONS
======================================================================*/
public client_disconnect(id)
{
    
extradmg[id] = false;
    
extrafragdmg[id] = false;
    
extrashottydmg[id] = false;
    
g_RandomUsed[id] == 0
}
 
// if the damage mult and trail effects should dissapear upon the player's death then uncomment this function
 
public sh_client_death(victimattackerheadshot, const wpnDescription[])
{
    
extradmg[victim] = false;
    
extrafragdmg[victim] = false;
    
extrashottydmg[victim] = false;
}
 
/* if the damage mult should only last 1 round then uncomment this function
 
public sh_round_end()
{
    arrayset(extradmg, false, SH_MAXSLOTS+1);
    arrayset(extrashottydmg, false, SH_MAXSLOTS+1);
}
*/
/*======================================================================
DAMAGE MULT OPTIONS 
======================================================================*/
 
public cmd_menu(id)
{
    if ( 
is_user_alive(id) )
    {
        
client_print_color(idBlue"[WpnMenu Made By v1.0 RB]");
 
        new 
shopmenu menu_create("Choose Your Weapon Set""menu_handler");
        
menu_additem(shopmenu"/yBuy M4A1 + HE""0"0);
        
menu_additem(shopmenu"/yBuy AK47 + HE""1"0);
        
menu_additem(shopmenu"/yBuy AWP + Kevlar""2"0);
        
menu_additem(shopmenu"/yBuy M249 + Deagle/Flash""3"0);
        
menu_additem(shopmenu"/yBuy CSW_G3SG1""4"0);
        
menu_additem(shopmenu"/yBuy Random Gift(Free! Use Twice Only With A 60% chance!)""8"0);        
        
menu_additem(shopmenu"/yBuy Shotty(-50hp)""9"1);
 
        new 
buffer[18];    //allows us to format the color based on admin or not
        
formatex(buffercharsmax(buffer), "%sBuy Ultimate M3", (get_user_flags(id) & ADMIN_ADMIN) ? "/y" "/w");
        
menu_additem(shopmenubuffer"6");
 
        
formatex(buffercharsmax(buffer), "%sBuy Super HE", (get_user_flags(id) & ADMIN_ADMIN) ? "/y" "/w");
        
menu_additem(shopmenubuffer"7");
 
        switch(
cs_get_user_team(id))
        {                        
            case 
CS_TEAM_CT:
            {
                
menu_additem(shopmenu"/yBuy Enchanted Bow""5"0);           
            }
 
            case 
CS_TEAM_T:
            {
                
menu_additem(shopmenu"/yBuy Strong MAC10""5"0);           
            }
        }
        
menu_setprop(shopmenuMPROP_EXITMEXIT_ALL);
        
menu_display(idshopmenu0); 
 
    } else 
client_print(idprint_chat"[AMXX] You Have To Be Alive To Use The Menu."); //this insult brought to you by 1 random guy :P
}
 
public 
menu_handler(idshopmenuitem)
{  
    if ( 
item == MENU_EXIT )
    {
        
menu_destroy(shopmenu);
        return 
PLUGIN_HANDLED;
    }
 
    if ( !
is_user_alive(id) )    //in case a player waits till they die and then chooses an option
    
{
        
menu_destroy(shopmenu);
        
client_print(idprint_chat"[AMXX] You Have To Be Alive To Use The Menu.");
        return 
PLUGIN_HANDLED;
    } 
 
    new 
data[2], accescallbackkey;
    
menu_item_getinfo(shopmenuitemaccesdata1__callback);
 
    
key str_to_num(data);
 
    if ( 
<= key 10 )
    {
        new 
usermoney cs_get_user_money(id);
        new 
cost itemcost[key];
        if ( 
usermoney >= cost )
        {
            
cs_set_user_money(idusermoney cost); 
 
            if ( 
<= key <= 4client_print(idprint_chat"[AMXX] Bought Weapon Set %i"key+1);
 
            switch(
key)
            {
                case 
0// M4A1 + HE
                
{
                    
sh_give_weapon(idCSW_M4A1true);
                    
sh_give_weapon(idCSW_HEGRENADE);
                }
 
                case 
1// AK47 + HE
                
{
                    
sh_give_weapon(idCSW_AK47true);
                    
sh_give_weapon(idCSW_HEGRENADE);
                }
 
                case 
2// AWP + Kevlar
                
{
                    
sh_give_weapon(idCSW_AWPtrue);
                    
set_user_armor(id100);
                }
 
                case 
3// M249 + Deagle/Flash
                
{
                    
sh_give_weapon(idCSW_M249true);
                    
sh_give_weapon(idCSW_DEAGLE);
                    
sh_give_weapon(idCSW_FLASHBANG);
                }
 
                case 
4sh_give_weapon(idCSW_G3SG1true); // G3SG1
 
                
case 5// Enchanted Bow || Rapid Semi-Fire Glock
                
{
                    if ( 
cs_get_user_team(id) == CS_TEAM_CT )
                    {
                        
client_print(idprint_chat"[AMXX] Bought Enchanted Bow");
                        
sh_give_weapon(idCSW_SCOUTtrue);
                        
extradmg[id] = true;
                        
bowtrail[id] = true;
                    }
                    else if ( 
cs_get_user_team(id) == CS_TEAM_T 
                    {                        
                        
client_print(idprint_chat"[AMXX] Bought Strong MAC10");
                        
sh_give_weapon(idCSW_MAC10);
                        
extradmg[id] = true;
                    }                    
                }
 
                case 
67// Ulimate M3 and Super HE
                
{
                    if ( !(
get_user_flags(id) & ADMIN_ADMIN) )
                    {
                        
client_print(idprint_chat"[AMXX] Only the admins get to use this option."); //this insult brought to you by 1 random guy :P
                        
menu_destroy(shopmenu);
                        
cmd_menu(id);
                        return 
PLUGIN_HANDLED;
                    }
 
                    if ( 
key == )
                    {
                        
client_print(idprint_chat"[AMXX] Bought Super HE");
                        if ( 
cs_get_user_bpammo(idCSW_HEGRENADE) >= )    //get_user_weapon only checks current weapon so instead we check if the user has a nade with this code
                        
{
                            
client_print(idprint_chat"[AMXX] You Already Have A Greande."); 
                            
menu_destroy(shopmenu);
                            
cmd_menu(id);
                            return 
PLUGIN_HANDLED;                    
                        }
 
                        
sh_give_weapon(idCSW_HEGRENADE);
                        
grenadetrail[id] = true;
                        
extrafragdmg[id] = true;    
                        } else {
                        
client_print(idprint_chat"[AMXX] Bought Ultimate M3");
                        
sh_give_weapon(idCSW_M3true);
                        
extradmg[id] = true;
                    }
                }
 
                case 
8// Random Gift
                
{
                    if (
g_RandomUsed[id] == 2)
                    { 
                        
client_print(idprint_center"[AMXX] You've Already Used Random Gift Twice!");
                    }
                    else if (
g_RandomUsed[id] < 2)
                    {
                        
g_RandomUsed[id]++
                        
set_task(0.1"random_reward"___"b");
                    }
                }
 
                case 
9// Shotty
                
{
                    if ( 
get_user_health(id) > 50 )
                    {
                        
client_print(idprint_center"[AMXX] Bought Shotty");
                        
sh_give_weapon(idCSW_XM1014true);
                        
extrashottydmg[id] = true;
                        
set_user_health(idget_user_health(id) - 50);
 
                        new 
iEnt = -1;
                        while ( ( 
iEnt find_entity_by_owner(iEnt"weapon_xm1014"id0) ) );
                        {
                            new 
szClassname[33];
                            
pev(iEntpev_classnameszClassname32);
 
                            if (
equali(szClassname"weapon_xm1014"))
                            {
                                
sh_set_rendering(iEnt02250100kRenderFxGlowShellkRenderTransAlpha);
                            }
                    }
                    else 
                    {
                        
client_print(idprint_center"[AMXX] You Don't Have Enough Health To Sacrifice!");
                        
menu_destroy(shopmenu);
                        return 
PLUGIN_HANDLED;
                    }
                }                
            }      
        } else 
client_print(idprint_chat"[AMXX] You Don't Have Enough Money(You Cheap Bastard).");    //this insult brought to you by 1 random guy :P
    
}
    
menu_destroy(shopmenu);
    return 
PLUGIN_HANDLED;

 
public 
join_team()
{    
    new 
id read_data(1);   
 
    if(!
is_user_connected(id))
        return 
PLUGIN_CONTINUE;    
 
    
show_message(id);
 
    return 
PLUGIN_CONTINUE;
}
 
show_message(id)
{        
    if (!
gMessageShown[id]) 
    {     
        
gMessageShown[id] = true;
 
        new 
name[32];
        
get_user_name(idname31);
 
        
set_dhudmessage(227968, -1.00.3000.253.00.450.90true);
        
show_dhudmessage(id"[AMXX] Hello %s! Type /buy <Weapon Menu>"name); 
    }
}
 
public 
super_grenade(id)
{
    if ( !
is_user_alive(id) || !grenadetrail[id] ) return;
 
    if ( 
read_data(1) == AMMOX_HEGRENADE 
    {                
        new 
iCurrent = -1;
        while ( ( 
iCurrent engfunc(EngFunc_FindEntityByStringiCurrent"classname""grenade") ) > 
        {
            new 
string[32];
            
pev(iCurrentpev_classnamestring31);
 
            if ( 
id == pev(iCurrentpev_owner) && equali(HEGrenadestring)) 
            {
                
// Make the nade glow
                
sh_set_rendering(iCurrent225020100kRenderFxGlowShellkRenderTransAlpha);    //vittu didn't waste time adding natives for no reason
 
                // Make a trail
                
message_begin(MSG_BROADCASTSVC_TEMPENTITY)
                
write_byte(22);            //TE_BEAMFOLLOW
                
write_short(iCurrent);    // entity:attachment to follow
                
write_short(gTrail);    // sprite index
                
write_byte(10);        // life in 0.1's
                
write_byte(10);        // line width in 0.1's
                
write_byte(225);    // colour
                
write_byte(90);
                
write_byte(102);
                
write_byte(255);    // brightness
                
message_end();    
 
                
grenadetrail[id] = false;    //trail is already attached to our current nade so it's safe to remove our status here before user gets another        
                
break;    //found our nade so no reason to continue looping through others                    
            
}    
        }
    }
}
 
public 
enchanted_tracer(id
{
    if ( !
bowtrail[id] ) return; 
 
    if ( 
read_data(2) == CSW_SCOUT 
    {  
        new 
origin[3], aimvec[3];
        
get_user_origin(idaimvec1); 
        
get_user_origin(idorigin3); 
 
        
// tracer beam
        
message_begin(MSG_PASSVC_TEMPENTITYorigin)
        
write_byte(0);        // TE_BEAMPOINTS
        
write_coord(origin[0]);
        
write_coord(origin[1]);
        
write_coord(origin[2]);
        
write_coord(aimvec[0]);
        
write_coord(aimvec[1]);
        
write_coord(aimvec[2]);
        
write_short(gBowTrail);    // sprite index
        
write_byte(0);        // starting frame
        
write_byte(10);        // frame rate
        
write_byte(2);        // life in 0.1's
        
write_byte(4);        // line width in 0.1's
        
write_byte(1);        // noise in 0.1's
        
write_byte(0);          // colour
        
write_byte(153);        
        
write_byte(80);        // brightness
        
write_byte(100);        // scroll speed
        
message_end();
    }    
}
 
public 
sh_client_spawn(id)
{
    
grenadetrail[id] = false;         
    
bowtrail[id] = false;
}
 
public 
sh_round_new()
    
client_print(0print_chat"[AMXX] <WpnMenu v1.0 MadeBy RollerBlades>");
 
public 
revive(idlevelcidusermoney)
{
    if ( !
cmd_access(idlevelcid0) ) 
    {
        
client_print(idprint_chat"[AMXX] No Access");
        return 
PLUGIN_HANDLED;
    }
 
    if ( 
is_user_alive(id) ) return PLUGIN_HANDLED;
 
    if (
usermoney >= get_pcvar_num(g_pReviveCost))
    {
        
cs_set_user_moneyidusermoney get_pcvar_num(g_pReviveCost) );
        
ExecuteHamB(Ham_CS_RoundRespawnid);
        
cmd_menu(id);
        
client_print(idprint_chat"[AMXX] Bought A Second Life");
    } else 
client_print_color(idDontChange"[AMXX] You Need ^4$%d ^1To Revive Your Self(You Cheap Bastard)"get_pcvar_num(g_pReviveCost));    //this insult brought to you by 1 random guy :P
 
    
return PLUGIN_CONTINUE;

 
public 
random_reward(shopmenu)
{
    static 
iplayers[32], playerCountid;
    
get_players(playersplayerCount"ah");
 
    static 
RandomNumRandomNum random_num(05);
 
    for ( 
0playerCounti++ )
    {
        
id players[i];
 
        if ( 
RandomNum == (2) )
        {
            
sh_give_weapon(idCSW_AWPtrue);
            
client_print(idprint_chat"[AMXX] Congratulations! You Just Won A AWP!");
            
menu_destroy(shopmenu);
        }
        else if ( 
RandomNum == (3) )
        {
            
sh_give_weapon(idCSW_FAMAStrue);
            
client_print(idprint_chat"[AMXX] Congratulations! You Just Won A FAMAS!");
            
menu_destroy(shopmenu);
        }
        else if ( 
RandomNum == (5) )
        {
            
sh_give_weapon(idCSW_SG552true);
            
client_print(idprint_chat"[AMXX] Congratulations! You Just Won A SG552!");
            
menu_destroy(shopmenu);
        }
        else {
            
client_print(idprint_chat"[AMXX] Better Luck Next Time");
            
menu_destroy(shopmenu);
            
cmd_menu(id); 
        }
    }
}
 
public 
show_DeathMsg(name[32]) // i made a second Death Function in case the first one was commented
{
    new 
iAttacker read_data(1);
    new 
iVictim read_data(2);
 
    if (
iVictim != iAttacker && (get_user_flags(iVictim) & ADMIN_ADMIN))
    {
        
get_user_name(iVictimname31);
        
client_print(iVictimprint_chat"[AMXX] Hello %s! Type /revive <WeaponMenu>"name);
    }


Last edited by RollerBlades; 06-24-2011 at 14:55.
RollerBlades is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 06-24-2011 , 14:36   Re: Getting loads of errors when trying to find a entity
Reply With Quote #6

1. You were missing a closing brace from that entity code.
2. The function is find_ent_by_owner() not find_entity_by_owner().
3.
PHP Code:
while ( ( iEnt find_ent_by_owner(iEnt"weapon_xm1014"id0) ) ); 
You had a semicolon there, for some reason.

Attached the fixed version.
Attached Files
File Type: sma Get Plugin or Get Source (rollerblades_weaponmenu.sma - 600 views - 14.7 KB)
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 23:34.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode