AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Problem with compile (https://forums.alliedmods.net/showthread.php?t=184205)

Sale 05-02-2012 08:06

Problem with compile
 
I was edited this plugin, using aaarnas tutorial > here
When try compile i got this error :
http://krileimg.net78.net/images/error.jpg

This is my (edited) code:
PHP Code:

/*
    ----------------------------
    Description
    ----------------------------
    A Zombie Class for Zombie Plague Mod( Dummy Zombie )
    What can this do?
    
    * Liez to them and backstab them :D
    * Trap them
    
    ----------------------------
    Update Logs
    ----------------------------
    v1.0 - Intial Release
    
    ----------------------------
    Suggestions & Bug reporting
    ----------------------------
    1. PM( Private Message ) me( Recommended, I online very often. )
    
    ----------------------------
    Credits
    ----------------------------
    007 -> Re-edited it to a zombie :|
    Twilight Suzuka -> NPC Plug-in( https://forums.alliedmods.net/showthread.php?t=11756 )
    01101101 -> Removing entity on Round Start( https://forums.alliedmods.net/showpost.php?p=1071507&postcount=3 )
    ----------------------------
*/

#include < amxmodx >
#include < engine >
#include < zombieplague >

new const zclass_name[ ] = "Illusion Zombie"
new const zclass_info[ ] = "Make Dummy [E]"
new const zclass_model[ ] = "za_fleshpound"
new const zclass_clawmodel[ ] = "v_knife_zombie_fleshpound.mdl"
const zclass_health 2000
const zclass_speed 200
const Float:zclass_gravity 1.0
const Float:zclass_knockback 0.5

// Models
new const dummy_model[ ] = "models/player/za_fleshpound/za_fleshpound.mdl"

new g_zclass_dummygCvarDummyShouldDiegCvarDummyHealthgCvarDummyAnimationgCvarDummyLimit

// Prevents people from spamming
new gCounter33 ]

public 
plugin_init( ) 
{
    
register_plugin"[ZP] Zombie Class: Dummy Zombie""1.0""007 & Twilight Suzuka & 01101101" )
    
    
register_think"npc_dummy","npc_think" )
    
    
register_event"HLTV""event_new_round""a""1=0""2=0" )
    
    
gCvarDummyShouldDie register_cvar"zp_dummy_should_die""1" // ( 0 : Dummy will not die || 1: Dummy will die ) Default: 1
    
gCvarDummyHealth register_cvar"zp_dummy_health""100" // Dummy's health Default: 100
    
gCvarDummyAnimation register_cvar"zp_dummy_animation""1" // ( 0 : Dummy floating animation || 1: Dummy standing animation ) Default: 1
    
gCvarDummyLimit register_cvar"zp_dummy_spawn_limit""5" // Amount of dummy he can spawn when he gets infected
    // NOTE: If he antidotes and get infected again he can spawn dummies again.
}

public 
plugin_precache( )
{
    
g_zclass_dummy zp_register_zombie_classzclass_namezclass_infozclass_modelzclass_clawmodelzclass_healthzclass_speedzclass_gravityzclass_knockback )
    
precache_modeldummy_model )
}
public 
zp_user_infected_pre(id) {
    if(!(
get_user_flags(id) & ADMIN_LEVEL_C)) {
        if (
zp_get_user_next_class(id) == g_zclass_dummy) {
            
zp_set_user_zombie_class(id0)
            
client_print(idprint_center"Klasa koju si odabrao je samo za *HEAD* Admine.")
            
client_print(idprint_chat"Odabrana klasa je samo za *HEAD* Admine. Bice promenjena na The Undead.")
        }    
    }
}  
// Thanks 01101101( Removing entity )
public event_new_round( )
{
    new 
ent = -1
    
while( ( ent find_ent_by_classent"npc_dummy" ) ) )
    {
        
remove_entityent )
    }
}

public 
client_PreThinkid )
{
    if( !
is_user_aliveid ) || !zp_get_user_zombieid ) || zp_get_user_zombie_classid ) != g_zclass_dummy || zp_get_user_nemesisid ) || zp_get_user_survivorid ) )
        return 
PLUGIN_HANDLED
    
    
// No more slowhacking!
    
new button get_user_buttonid )
    new 
oldbutton get_user_oldbuttonid )
    
    if( !( 
oldbutton IN_USE ) && ( button IN_USE ) )
        
create_dummyid )

    return 
PLUGIN_HANDLED
}

public 
zp_user_infected_postidinfector )
{
    if( 
zp_get_user_zombie_classid ) == g_zclass_dummy && !zp_get_user_nemesisid ) )
    {
        
gCounterid ] = 0
        client_print
idprint_chat"[ZP] Press your ^"+use^" button to build a dummy!" )
    }
}

public 
create_dummyid )
{
    if( 
gCounterid ] >= get_pcvar_numgCvarDummyLimit ) )
    {
        
client_printidprint_chat"[ZP] Достигнут лимит илюзии!" )
        return 
PLUGIN_HANDLED
    
}
    
    new 
Float:origin]
    
    
entity_get_vectoridEV_VEC_origin,origin )
    
    new 
ent create_entity"info_target" )
    
    
entity_set_originentorigin )
    
origin] += 50.0
    entity_set_origin
id,origin )
    
    
entity_set_floatentEV_FL_takedamageget_pcvar_floatgCvarDummyShouldDie ) )
    
entity_set_floatentEV_FL_healthget_pcvar_floatgCvarDummyHealth ) )
    
    
entity_set_stringentEV_SZ_classname"npc_dummy" )
    
entity_set_modelentdummy_model )
    
entity_set_intentEV_INT_solid)
    
    
entity_set_byteentEV_BYTE_controller1125 )
    
entity_set_byteentEV_BYTE_controller2125 )
    
entity_set_byteentEV_BYTE_controller3125 )
    
entity_set_byteentEV_BYTE_controller4125 )
    
    new 
Float:maxs] = { 16.016.036.0 }
    new 
Float:mins] = { -16.0, -16.0, -36.0 }
    
    
entity_set_sizeentminsmaxs )
    
    
entity_set_floatentEV_FL_animtime2.0 )
    
entity_set_floatentEV_FL_framerate1.0 )
    
entity_set_intentEV_INT_sequenceget_pcvar_numgCvarDummyAnimation ) )
    
    
entity_set_floatent,EV_FL_nextthinkhalflife_time( ) + 0.01 )
    
    
drop_to_floorent )
    
    
gCounterid ] ++
    
client_printidprint_chat"[ZP] You've used %d / %d dummies."gCounterid ], get_pcvar_numgCvarDummyLimit ) )
    
    return 
1
}

public 
npc_thinkid )
{
    
entity_set_floatidEV_FL_nextthinkhalflife_time( ) + 0.01 )
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1033\\ f0\\ fs16 \n\\ par }
*/ 

Please help

Napoleon_be 05-02-2012 08:11

Re: Problem with compile
 
Choose a directory to output your plugins when compiled.

Sale 05-02-2012 16:10

Re: Problem with compile
 
Quote:

Originally Posted by Napoleon_be (Post 1700377)
Choose a directory to output your plugins when compiled.

I already have directory to output compiled plugins. When i try to compile original plugin (without my edit), plugin compiled successfully. Any other suggestion?

wickedd 05-02-2012 20:37

Re: Problem with compile
 
It compiled for me.

fysiks 05-02-2012 21:12

Re: Problem with compile
 
Compiles fine for me. What function is it having issues with? Maybe you need a correct version of zombieplague.inc.


Quote:

Originally Posted by Napoleon_be (Post 1700377)
Choose a directory to output your plugins when compiled.

That's not really an error. That just means that it couldn't compile.

Sale 05-03-2012 03:21

Re: Problem with compile
 
Quote:

Originally Posted by fysiks (Post 1700842)
Compiles fine for me. What function is it having issues with? Maybe you need a correct version of zombieplague.inc.

Can you give me your include folder?

mottzi 05-03-2012 07:11

Re: Problem with compile
 
Download it from the original source.

Sale 05-03-2012 08:27

Re: Problem with compile
 
Quote:

Originally Posted by mottzi (Post 1701020)
Download it from the original source.

sourceforge doesnt work

wickedd 05-03-2012 09:01

Re: Problem with compile
 
Have you searched the forum?

claudiuhks 05-03-2012 09:16

Re: Problem with compile
 
You just need SMA file, include directory, spcomp and compile EXE files.
Create on your desktop a folder named scripting and place in it these files.
Drag and drop SMA file to compile EXE.


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

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