Raised This Month: $ Target: $400
 0% 

What does "NaN origin" mean?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Hayer
Junior Member
Join Date: Aug 2006
Old 07-24-2009 , 06:04   What does "NaN origin" mean?
Reply With Quote #1

Hi!

Some part of my code returns
"Got a NaN origin on ent_test"

What does this mean? What is the most common error?
Sorry, but I aint got the source here - testing from a external computer.

But as I recall the commands I'm using
* register_touch("ent_test","player","touching" )
* ent_test = create_entity("info_target")
* entity_set_string(ent_TFlag, EV_SZ_classname, "ent_test")
* entity_set_model(ent_test, "models/vip/vip.mdl")
* entity_set_origin( ent_test , testPosition )
* entity_set_int( ent_test, EV_INT_solid, 1 )
* entity_set_int( ent_test, EV_INT_movetype, 6 )

And another problem is that the entity does not appear but I guess thats cause of the "NaN origin"-error?
Hayer is offline
jim_yang
Veteran Member
Join Date: Aug 2006
Old 07-24-2009 , 06:08   Re: What does "NaN origin" mean?
Reply With Quote #2

NaN means not a number, must be something wrong with the "testPosition" variable
__________________
Project : CSDM all in one - 99%
<team balancer#no round end#entity remover#quake sounds#fake full#maps management menu#players punishment menu#no team flash#colored flashbang#grenade trails#HE effect#spawn protection#weapon arena#weapon upgrade#auto join#no weapon drop#one name>
jim_yang is offline
Hayer
Junior Member
Join Date: Aug 2006
Old 07-24-2009 , 06:26   Re: What does "NaN origin" mean?
Reply With Quote #3

First of all; Thanks for a fast replay!

Here is how I define the variable testPosition :
new Float:testPosition[3] = { 125 , -1539 , 144 }
then I call the
entity_set_origin( ent_test , testPosition )


Just some off-topic:
Can I do a call like this
entity_set_origin( ent_test , { 125 , -1539 , 144 } )




Edit : It is supposed to spawn somewhere close to the CTSpawn on de_dust.
Hayer is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 07-24-2009 , 06:28   Re: What does "NaN origin" mean?
Reply With Quote #4

{ 125 , -1539 , 144 } -> { 125.0 , -1539.0 , 144.0 }
__________________
Arkshine is offline
Hayer
Junior Member
Join Date: Aug 2006
Old 07-24-2009 , 06:34   Re: What does "NaN origin" mean?
Reply With Quote #5

Thanks! Going to test that soon!

This is much closer to C++ syntax then I tough first.
Hayer is offline
Hayer
Junior Member
Join Date: Aug 2006
Old 07-24-2009 , 06:58   Re: What does "NaN origin" mean?
Reply With Quote #6

Okey; thanks! Thats working great!

Now, just a little off-topic

Code:
public touching( pToucher , pTouched )
{
	if( cs_get_user_team( pToucher ) == CS_TEAM_T )
	{
		client_print(1, print_chat, "Your a terrorist!");
	}
}
I guessed that this was wrong - and it was. How would I go about doing this?
Hayer is offline
TitANious
Veteran Member
Join Date: Feb 2009
Location: Denmark
Old 07-24-2009 , 07:13   Re: What does "NaN origin" mean?
Reply With Quote #7

If you print it to "1" Then you print it to "id" "1".
You should do something else.
__________________
I dislike this.

"A sneeze never comes alone!" <-- Important to remember.
TitANious is offline
Send a message via MSN to TitANious
xPaw
Retired AMX Mod X Moderator
Join Date: Jul 2008
Old 07-24-2009 , 07:15   Re: What does "NaN origin" mean?
Reply With Quote #8

PHP Code:
public touchingpToucher pTouched )
{
    if( 
is_user_alivepToucher ) )
    {
        if( 
cs_get_user_teampToucher ) == CS_TEAM_T )
        {
            
client_print(pToucherprint_chat"Your a terrorist!");
        }
    }

__________________
xPaw is offline
Hayer
Junior Member
Join Date: Aug 2006
Old 07-24-2009 , 07:30   Re: What does "NaN origin" mean?
Reply With Quote #9

I was talking about
Code:
if( cs_get_user_team( pToucher ) == CS_TEAM_T )
It doesn't seem to work :/

Edit:
It only spits out
* [AMXX] Run time error 10: native error (native "cs_get_user_team")
in the serverconsole.

Last edited by Hayer; 07-24-2009 at 07:33.
Hayer is offline
TitANious
Veteran Member
Join Date: Feb 2009
Location: Denmark
Old 07-24-2009 , 07:46   Re: What does "NaN origin" mean?
Reply With Quote #10

Have you the module "cstrike"?
And included it in the code?
__________________
I dislike this.

"A sneeze never comes alone!" <-- Important to remember.
TitANious is offline
Send a message via MSN to TitANious
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 18:21.


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