Raised This Month: $ Target: $400
 0% 

about amx_ejl_missiles.sma


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
ol
Senior Member
Join Date: Jul 2004
Old 09-25-2004 , 11:55   about amx_ejl_missiles.sma
Reply With Quote #1

i convered it to amxx0.2,and compile it very nice.but when i run it on amxx 0.2 rc6(debug) ,i get some error info:

L 09/25/2004 - 236:17: [Engine] Invalid Entity 0 ("cstrike\addons\amxmodx\plugins\amx_ejl_miss iles.amxx", line 454)


who can fix it?
Attached Files
File Type: sma Get Plugin or Get Source (amxx_ejl_missiles.sma - 597 views - 97.2 KB)
ol is offline
jtp10181
Veteran Member
Join Date: May 2004
Location: Madison, WI
Old 09-25-2004 , 13:12  
Reply With Quote #2

I will be posritng all my plugins to amxmodx 0.20 soon.

to fix that error just add a simple check

if the ent id is 0 then return (or stop doing whatever itsa doing)
__________________
jtp10181 is offline
Send a message via ICQ to jtp10181 Send a message via AIM to jtp10181 Send a message via MSN to jtp10181 Send a message via Yahoo to jtp10181
ol
Senior Member
Join Date: Jul 2004
Old 09-26-2004 , 02:14  
Reply With Quote #3

how to do it?

can you fix it and upload it for me?
ol is offline
breaddawson
Senior Member
Join Date: Jul 2004
Location: Beijing,China
Old 09-27-2004 , 07:39  
Reply With Quote #4

Quote:
Originally Posted by jtp10181
I will be posritng all my plugins to amxmodx 0.20 soon.

to fix that error just add a simple check

if the ent id is 0 then return (or stop doing whatever itsa doing)
yes,u r right
i run it in debug mode
and found it's all about "new id = entity_get_edict(iCurrent, EV_ENT_owner)"
and the id was 0
amx x said that
Code:
" [Engine] Invalid Entity 0 ("cstrike\addons\amxmodx\plugins\missiles.amxx", line 2182)"
"[AMXX] Run time error 10 (native) on line 2182 (file "F:\Cs1.6\cstrike\addons\amxmodx\scripting\missiles.sma")."
what should i do 2 fix it?
just delete the symbol "id"??
what's the purpose of the function"entitiy_get_edict"
i found it in the "engine.inc"

maybe u can get the id of one entity ?
and if the id is 0
amxx will tell u there's one mistake happening

i'm a newbie in AMX X scriping
__________________
i'm bread dawson ,a chinese boy
wish u be happy~
breaddawson is offline
Send a message via ICQ to breaddawson Send a message via MSN to breaddawson
breaddawson
Senior Member
Join Date: Jul 2004
Location: Beijing,China
Old 09-27-2004 , 10:06  
Reply With Quote #5

i've "fixed" that
but i don't know whether this fix by me is correct

Code:
while ((iCurrent = find_ent_by_class(-1, "lud_missile")) !=-1){ 

		new id = entity_get_edict(iCurrent, EV_ENT_owner)	

		remove_missile(id,iCurrent)
	}
i thought maybe the error was because "iCurrent" is 0
so i changed"while ((iCurrent = find_ent_by_class(-1, "lud_missile")) !=-1)" to "while ((iCurrent = find_ent_by_class(-1, "lud_missile")) !=0)"

then the error messages were gone

another error in line 429 was fixed like this
Code:
entity_get_string(pToucher, EV_SZ_classname, szClassName, 31)
i changed it to

Code:
	if (pToucher!=0)
	{
		entity_get_string(pToucher, EV_SZ_classname, szClassName, 31)
	}
the modified missiles.sma is in the attachment
so if u wish,u can test it whether it worked well


Edit:the attachment once here was removed (20041003)
__________________
i'm bread dawson ,a chinese boy
wish u be happy~
breaddawson is offline
Send a message via ICQ to breaddawson Send a message via MSN to breaddawson
ol
Senior Member
Join Date: Jul 2004
Old 09-27-2004 , 11:49  
Reply With Quote #6

thk it work fine

but , missile info in menu is not work

plz have a look
ol is offline
Reply


Thread Tools
Display Modes

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 17:20.


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