This is an uwc3 Ultimate
Normal when presing the bind for this skill a beeping should here and the first enemy you aim should be entagled.
But it doesent and in the console apears "unknown command wcentagle"
wcentagle = is the bind required for this ultimate.
now the log tell us this.
Code:
L 10/07/2009 - 13:16:32: Start of error session.
L 10/07/2009 - 13:16:32: Info (map "fy_snow") (file "addons/amxmodx/logs/error_20091007.log")
L 10/07/2009 - 13:16:32: [AMXX] Displaying debug trace (plugin "uwc3.amxx")
L 10/07/2009 - 13:16:32: [AMXX] Run time error 4: index out of bounds
L 10/07/2009 - 13:16:32: [AMXX] [0] tasks.inl::searchtarget (line 1724)
L 10/07/2009 - 13:16:32: [AMXX] [1] ultimates.inl::Ult_Entangle (line 1425)
L 10/07/2009 - 13:16:33: [AMXX] Displaying debug trace (plugin "uwc3.amxx")
L 10/07/2009 - 13:16:33: [AMXX] Run time error 4: index out of bounds
L 10/07/2009 - 13:16:33: [AMXX] [0] tasks.inl::searchtarget (line 1724)
L 10/07/2009 - 13:16:33: [AMXX] [1] ultimates.inl::Ult_Entangle (line 1425)
This is the task code for this ultimate
PHP Code:
/* Entangle Roots */
public Task_Destroy_Roots ( args[] )
{
remove_entity ( args[0] );
}
public searchtarget(parm[2])
{
new id = parm[0];
new enemyz, body;
get_user_aiming(id,enemyz,body);
if ( Util_Is_Valid_Player( id ) && Util_Is_Valid_Player( enemyz) && ( enemyz != id ) && Util_NotSame_Team ( id , enemyz ) && is_user_alive ( id ) && is_user_alive ( enemyz ) )
{
if ( Util_Is_Valid_Player( enemyz ) || (!temp_immunity[enemyz] && Util_IsPlayer_Immune ( enemyz, 2 ) ) )
{
temp_immunity[enemyz] = true;
if ( Util_Should_Msg_Client( enemyz ) )
{
client_print ( enemyz, print_chat, "%L", enemyz, "ULTIMATE_ENGANGLE_RESISTANT", MOD );
}
new iparm[2];
iparm[0] = enemyz;
copy( iparm[1], 31, "Entangling roots" );
set_task ( 5.0, "Task_Reset_Immunity", TASK_RESET_IMMUNITY + enemyz, iparm, 2 );
}
if ( !stunned[enemyz] && playeritem[enemyz]!=IMMUNITY && !hasblink[enemyz] && !temp_immunity[enemyz] )
{
issearching[id]=false;
ultimateused[id]=true;
icon_controller(id);
if ( Util_Should_Msg_Client( id ) )
{
if ( file_exists ( "sound/warcraft3/entanglingrootstarget1.wav" ) == 1 )
{
emit_sound ( id, CHAN_ITEM, "warcraft3/entanglingrootstarget1.wav", 1.0, ATTN_NORM, 0, PITCH_NORM );
}
else
{
if ( file_exists ( "sound/weapons/cbar_hitbod3.wav" ) == 1 )
{
emit_sound ( id,CHAN_ITEM, "weapons/cbar_hitbod3.wav", 1.0, ATTN_NORM, 0, PITCH_NORM );
}
}
}
new Float:speed = get_user_maxspeed( enemyz );
if( Util_Is_Valid_Player( enemyz ) )
{
if(speed > 1.0 && speed != oldSpeed[enemyz] )
{
oldSpeed[enemyz] = speed;
}
}
new waitparm[6];
waitparm[0]=enemyz;
waitparm[1]=100;
waitparm[5]=floatround(speed);
set_user_maxspeed(enemyz,1.0);
Task_Entangle_Stop(waitparm);
stunned[enemyz]=true;
new cooldownparm[1];
cooldownparm[0]=id;
set_task( CVAR_ENTANGLE_COOLDOWN,"cooldown",50+id,cooldownparm,1);
}
else
{
if( Util_Is_Valid_Player( id ) )
{
issearching[id]=true;
icon_controller(id);
}
new counter = parm[1];
while (counter >= 0)
{
counter -= 10;
if (counter==0)
emit_sound(id,CHAN_ITEM, "turret/tu_ping.wav", 1.0, ATTN_NORM, 0, PITCH_NORM);
}
--parm[1]
if (parm[1]>0 && get_user_health(id)>0)
{
set_task(0.1, "searchtarget", 200+id, parm, 2);
}
else
{
issearching[id]=false;
icon_controller(id);
}
}
}
return PLUGIN_CONTINUE
}
public Task_Entangle_Stop ( parm[6] )
{
new id=parm[0];
new origin[3];
get_user_origin ( id, origin );
if ( origin[0] == parm[2] && origin[1] == parm[3] && origin[2] == parm[4] )
{
new normalspeed = parm[5];
new resetparm[2];
resetparm[0] = id;
resetparm[1] = normalspeed;
set_task ( float ( parm[1]/10 ), "reset_maxspeed", TASK_RESET_MAXSPEED + id , resetparm, 2 );
new entangleparm[2];
entangleparm[0] = parm[0];
entangleparm[1] = parm[1];
Event_Entangle ( entangleparm );
}
else
{
parm[2] = origin[0];
parm[3] = origin[1];
parm[4] = origin[2];
set_task ( 0.1, "Task_Entangle_Stop", TASK_ENTANGLE_STOP, parm, 6 );
}
return PLUGIN_CONTINUE;
}
and this is the Ultimate code
PHP Code:
/* Entengle roots */
public Ult_Entangle ( id )
{
if ( !Ult_Can_Use ( id, SKILLIDX_ENTANGLE ) )
{
return PLUGIN_HANDLED;
}
if ( is_user_alive ( id ) && Util_Is_Valid_Player( id ) )
{
if( !issearching[id] && !ultimateused[id] )
{
new parm[2];
parm[0] = id;
parm[1] = ULTIMATESEARCHTIME;
searchtarget ( parm );
}
}
return PLUGIN_HANDLED;
}
Here are the files to.
PS we are triing to fix this over one moth and cant figure it out.Please help us.