Raised This Month: $51 Target: $400
 12% 

INVALID Entity


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
IAmReallyCool
Member
Join Date: Nov 2013
Old 03-13-2015 , 10:54   INVALID Entity
Reply With Quote #1

So I'm having this error :
Code:
L 03/13/2015 - 16:42:43: [ENGINE] Invalid entity 86

SOLVED!

Code:
public IceArrow_Think( ent ) { if( !is_valid_ent( ent ) ) return PLUGIN_HANDLED; new iVictim =entity_get_int( ent, EV_INT_iuser1 ); if( is_user_alive( iVictim ) ) { entity_set_follow( ent, iVictim, float( ICE_ARROW_SPEED ) ); new Float: Velocity[ 3 ], Float:NewAngle[ 3 ]; entity_get_vector( ent, EV_VEC_velocity, Velocity ); vector_to_angle( Velocity, NewAngle ); entity_set_vector( ent, EV_VEC_angles, NewAngle ); } else remove_entity( ent ); <b><font color="Red">entity_set_float( ent, EV_FL_nextthink, get_gametime() + 0.1 );</font></b> return PLUGIN_CONTINUE; }

Last edited by hornet; 03-14-2015 at 09:13. Reason: It is a violation of the forums rules to blank your post. Restored.
IAmReallyCool is offline
Jhob94
AMX Mod X Donor
Join Date: Jul 2012
Old 03-13-2015 , 11:02   Re: INVALID Entity
Reply With Quote #2

Because if victim is death, you remove the entity, so it isn't valid anymore. So, you must put that inside the if of user alive or don't remove the entity.
__________________
Jhob94 is offline
IAmReallyCool
Member
Join Date: Nov 2013
Old 03-13-2015 , 11:04   Re: INVALID Entity
Reply With Quote #3

Quote:
Originally Posted by Jhob94 View Post
Because if victim is death, you remove the entity, so it isn't valid anymore. So, you must put that inside the if of user alive or don't remove the entity.
Unbelievable, how could I make such a mistake, thanks!
IAmReallyCool is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 03-13-2015 , 11:52   Re: INVALID Entity
Reply With Quote #4

Don't blank your post, others can have same question too.
__________________
HamletEagle 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 04:05.


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