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

Solved Run time error 10: native error (native "entity_get_int")


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
amirwolf
Senior Member
Join Date: Feb 2019
Location: Iran
Old 01-24-2022 , 16:44   Run time error 10: native error (native "entity_get_int")
Reply With Quote #1

Hello
I have this error
HTML Code:
L 01/22/2022 - 17:18:02: [ENGINE] Invalid entity 189
L 01/22/2022 - 17:18:02: [AMXX] Displaying debug trace (plugin "basebuilder65.amxx")
L 01/22/2022 - 17:18:02: [AMXX] Run time error 10: native error (native "entity_get_int")
L 01/22/2022 - 17:18:02: [AMXX]    [0] basebuilder65.sma::cmdStopEnt (line 2373)
L 01/22/2022 - 17:18:02: [AMXX]    [1] basebuilder65.sma::fw_CmdStart (line 2247)

Last edited by amirwolf; 07-10-2022 at 04:04.
amirwolf is offline
iceeedr
Veteran Member
Join Date: Apr 2017
Location: Brazil
Old 01-24-2022 , 16:53   Re: Run time error 10: native error (native "entity_get_int")
Reply With Quote #2

Code:
is_valid_ent(ent)
{
       ....
}
__________________


Quote:
Originally Posted by fysiks View Post
Please stop trying to help. You appear to just be posting random stuff. Wait until you actually understand more about AMX Mod X and how the game works.
https://iceeedr.com.br/

Last edited by iceeedr; 01-24-2022 at 16:53.
iceeedr is offline
Send a message via Skype™ to iceeedr
amirwolf
Senior Member
Join Date: Feb 2019
Location: Iran
Old 01-24-2022 , 16:59   Re: Run time error 10: native error (native "entity_get_int")
Reply With Quote #3

I realized the mistake
thank you
I will try it

Last edited by amirwolf; 01-24-2022 at 17:05.
amirwolf is offline
Natsheh
Veteran Member
Join Date: Sep 2012
Old 01-24-2022 , 23:37   Re: Run time error 10: native error (native "entity_get_int")
Reply With Quote #4

Actually it should be pev_valid because pev_valid have more necessarily checks than is_valid_ent from engine.
__________________
@Jailbreak Main Mod v2.7.0 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !

Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
CrazY.
Veteran Member
Join Date: May 2015
Location: SP, Brazil
Old 01-25-2022 , 07:09   Re: Run time error 10: native error (native "entity_get_int")
Reply With Quote #5

Not sure where you read that but that is not valid, is_valid_ent works just as expected. We're in 1.10 now, I'm sure if there was a problem with is_valid_ent someone would have already reported.
__________________








CrazY. is offline
Natsheh
Veteran Member
Join Date: Sep 2012
Old 01-25-2022 , 08:37   Re: Run time error 10: native error (native "entity_get_int")
Reply With Quote #6

Quote:
Originally Posted by CrazY. View Post
Not sure where you read that but that is not valid, is_valid_ent works just as expected. We're in 1.10 now, I'm sure if there was a problem with is_valid_ent someone would have already reported.
I didn't point out there is a problem in is_valid_ent, it only checks if the entity index is less than the maximum entities count in the other hand pev_valid do some extra useful checks, you can check the source code of both natives and see the difference.
__________________
@Jailbreak Main Mod v2.7.0 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !

Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
CrazY.
Veteran Member
Join Date: May 2015
Location: SP, Brazil
Old 01-25-2022 , 12:54   Re: Run time error 10: native error (native "entity_get_int")
Reply With Quote #7

is_valid_ent does the same thing that pev_valid does, the only difference is that pev_valid will return 2 when the entity's private data is ready to be used by fakemeta's pdata natives. I guess you didn't read the source either.

Code:
static cell AMX_NATIVE_CALL amx_pev_valid(AMX *amx, cell *params)
{
	int idx = static_cast<int>(params[1]);

	edict_t *e = TypeConversion.id_to_edict(idx);

	if (FNullEnt(e))
		return 0;

	if (e->pvPrivateData)
		return 2;

	return 1;
}
Code:
int is_ent_valid(int iEnt)
{
	if (iEnt < 1 || iEnt > gpGlobals->maxEntities) 
		return 0;

	if (iEnt <= gpGlobals->maxClients)
	{
		if (!MF_IsPlayerIngame(iEnt))
		{
			return 0;
		}
	} else {
		if (FNullEnt(TypeConversion.id_to_edict(iEnt)))
		{
			return 0;
		}
	}

	return 1;
}
So no, one is not better than the other, use whatever you want to.
__________________









Last edited by CrazY.; 01-25-2022 at 12:55.
CrazY. is offline
Natsheh
Veteran Member
Join Date: Sep 2012
Old 01-25-2022 , 13:02   Re: Run time error 10: native error (native "entity_get_int")
Reply With Quote #8

It seems I've read the source of something similar to is_ent_valid, i remember it was one line code.
__________________
@Jailbreak Main Mod v2.7.0 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !


Last edited by Natsheh; 01-25-2022 at 13:02.
Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
amirwolf
Senior Member
Join Date: Feb 2019
Location: Iran
Old 01-27-2022 , 11:34   Re: Run time error 10: native error (native "entity_get_int")
Reply With Quote #9

I have an error again
Code:
L 01/27/2022 - 18:59:03: Start of error session.
L 01/27/2022 - 18:59:03: Info (map "bb_cg_aztec_b6") (file "addons/amxmodx/logs/error_20220127.log")
L 01/27/2022 - 18:59:03: [FAKEMETA] Invalid entity
L 01/27/2022 - 18:59:03: [AMXX] Displaying debug trace (plugin "basebuilder65.amxx")
L 01/27/2022 - 18:59:03: [AMXX] Run time error 10: native error (native "set_pev")
L 01/27/2022 - 18:59:03: [AMXX]    [0] basebuilder65.sma::ham_PlayerSpawn_Post (line 1516)
L 01/27/2022 - 18:59:04: [ENGINE] Invalid entity 65
L 01/27/2022 - 18:59:04: [AMXX] Displaying debug trace (plugin "basebuilder65.amxx")
L 01/27/2022 - 18:59:04: [AMXX] Run time error 10: native error (native "entity_get_int")
L 01/27/2022 - 18:59:04: [AMXX]    [0] basebuilder65.sma::cmdStopEnt (line 2373)
L 01/27/2022 - 18:59:04: [AMXX]    [1] basebuilder65.sma::fw_CmdStart (line 2247)
L 01/27/2022 - 18:59:50: [ENGINE] Invalid entity 65
L 01/27/2022 - 18:59:50: [AMXX] Displaying debug trace (plugin "basebuilder65.amxx")
L 01/27/2022 - 18:59:50: [AMXX] Run time error 10: native error (native "entity_get_int")
L 01/27/2022 - 18:59:50: [AMXX]    [0] basebuilder65.sma::cmdStopEnt (line 2373)
L 01/27/2022 - 19:00:01: [ENGINE] Invalid entity 65
L 01/27/2022 - 19:00:01: [AMXX] Displaying debug trace (plugin "basebuilder65.amxx")
L 01/27/2022 - 19:00:01: [AMXX] Run time error 10: native error (native "entity_get_int")
L 01/27/2022 - 19:00:01: [AMXX]    [0] basebuilder65.sma::cmdStopEnt (line 2373)
amirwolf is offline
DJEarthQuake
Veteran Member
Join Date: Jan 2014
Location: Astral planes
Old 01-27-2022 , 13:03   Re: Run time error 10: native error (native "entity_get_int")
Reply With Quote #10

Share the code please.
__________________
DJEarthQuake is offline
Old 01-27-2022, 13:18
amirwolf
This message has been deleted by amirwolf.
Old 01-27-2022, 17:50
amirwolf
This message has been deleted by amirwolf.
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 17:31.


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