AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Tech Support (https://forums.alliedmods.net/forumdisplay.php?f=36)
-   -   Compiling error!? (https://forums.alliedmods.net/showthread.php?t=281258)

Hatsune 04-06-2016 20:34

Compiling error!?
 
I was trying to make a custom hero to min but had compilation error,I did like explaining the topic but still gave error
PHP Code:

//Hatsune

/* CVARS - copy and paste to shconfig.cfg

//Hatsune
hatsune_level 12                        (Default:12)
hatsune_health 480                      (Default: 480)
hatsune_armor 250                       (Default: 250)
hatsune_grav 0.35                       (Default: 0.35)
hatsune_speed 395                       (Default: 395)
hatsune_ak47mult 3.5                    (Default: 395)

*/

#include <superheromod>
#include <amxmodx>

new gHeroID
new gHeroName[] = "Hatsune"
new bool:gHasHatsunePower[SH_MAXSLOTS+1]
new const 
gHatsuneWeapon[] = "models/shmod/ak47_hatsune.mdl"
new const gHatsunePlayer[] = "models/player/shmod/hatsune/hatsune.mdl"

//--------------------------------------------------------------------------------------------------
public plugin_init()
{
    
    
register_plugin("SUPERHERO hatsune""1.0""Hatsune")
    
//--------------------------------------------------------------------------------------------------

    
new pcvarLevel register_cvar("hatsune_level""12")
    
gHeroID sh_create_hero(gHeroNamepcvarLevel)
    
sh_set_hero_info(gHeroID"VIP""More HP, More AP, Lowest Gravity, Super Speed and AK47 Unlimited ammo and More damage")

//--------------------------------------------------------------------------------------------------
    
    
new pcvarHealth register_cvar("hatsune_health""480")
    
sh_set_hero_hpap(gheroIDpcvarHealth0)
    
//--------------------------------------------------------------------------------------------------
    
    
new pcvarArmor register_cvar("hatsune_armor""250")
    
sh_set_hero_hpap(gheroID0pcvarArmor

//--------------------------------------------------------------------------------------------------

    
new pcvarGrav register_cvar("hatsune_grav""0.35")
    
sh_set_hero_grav(gHeroIDpcvarGrav)

   
//--------------------------------------------------------------------------------------------------
 
    
new pcvarSpeed register_cvar("hatsune_speed""395")
    
sh_set_hero_speed(gHeroIDpcvarSpeed)
    
//--------------------------------------------------------------------------------------------------

    
new pcvarMult register_cvar("hatsune_ak47mult""3.5")
    
sh_set_hero_dmgmult(gHeroIDpcvarMultCSW_AK47)
    
register_event("CurWeapon""weapon_change""be""1=1")

    
//--------------------------------------------------------------------------------------------------

}

//--------------------------------------------------------------------------------------------------
public sh_hero_init(idheroIDmode)
{
    if (
gHeroID != heroID) return
    switch(
mode)
    {
        case 
SH_HERO_ADD:
        {

//--------------------------------------------------------------------------------------------------

            
gHasHatsunePower[id] = true
        
}
        case 
SH_HERO_DROP:
        {
            
gHasHatsunePower[id] = false
        
}
    
//--------------------------------------------------------------------------------------------------

    
switch (mode)
    {
        case 
SH_HERO_ADD:
        {
            
gHasHatsunePower[id] = true
            hatsune_weapon
(id)
            
switch_model(id)
        }
    
//--------------------------------------------------------------------------------------------------

        
case SH_HERO_DROP:
        {
            
gHasHatsunePower[id] = false
            
if (is_user_alive(id))
            {
                
sh_drop_weapon(idCSW_AK47true)
            }
        }
    }
}
//--------------------------------------------------------------------------------------------------
public sh_client_spawn(id)
{
    if (
gHasHatsunePower[id])
    {
        
hatsune_weapon(id)
    }
}
//--------------------------------------------------------------------------------------------------
hatsune_weapon(id)

{
    if (
sh_is_active() && is_user_alive(id) && gHasHatsunePower[id] )
    {
        
sh_give_weapon(idCSW_AK47)
    }
}
//--------------------------------------------------------------------------------------------------
public weapon_change(id)
{
    if ( !
sh_is_active() || !gHasHatsunePower[id] ) return
    new 
weaponID read_data(2)
    if (
weaponID !=CSW_AK47) return
    
switch_model(id)
    if (
read_data(3) == 0)
    {
        
sh_reload_ammo(id1)
    }
}
//--------------------------------------------------------------------------------------------------
switch_model(id)
{
    if (!
sh_is_active() || !is_user_alive(id) || !gHasHatsunePower[id] ) return
    if (
get_user_weapon(id) == CSW_AK47)
    {
        
set_pev(idpev_viewmodel2gHatsuneWeapon)
    }


and this is the error
http://prntscr.com/ap30i9
http://prntscr.com/ap30i9
Sorry if my English is wrong.

Bers 04-11-2016 06:20

Re: Compiling error!?
 
Try to see if you can fix it by your self, if not i will take a look at it later to night or so.


All times are GMT -4. The time now is 07:04.

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