What does "NaN origin" mean?
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? |
Re: What does "NaN origin" mean?
NaN means not a number, must be something wrong with the "testPosition" variable
|
Re: What does "NaN origin" mean?
First of all; Thanks for a fast replay! :D
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. |
Re: What does "NaN origin" mean?
{ 125 , -1539 , 144 } -> { 125.0 , -1539.0 , 144.0 }
|
Re: What does "NaN origin" mean?
Thanks! Going to test that soon!
This is much closer to C++ syntax then I tough first. |
Re: What does "NaN origin" mean?
Okey; thanks! Thats working great!
Now, just a little off-topic Code:
public touching( pToucher , pTouched ) |
Re: What does "NaN origin" mean?
If you print it to "1" Then you print it to "id" "1".
You should do something else. :) |
Re: What does "NaN origin" mean?
PHP Code:
|
Re: What does "NaN origin" mean?
I was talking about
Code:
if( cs_get_user_team( pToucher ) == CS_TEAM_T )Edit: It only spits out * [AMXX] Run time error 10: native error (native "cs_get_user_team") in the serverconsole. |
Re: What does "NaN origin" mean?
Have you the module "cstrike"?
And included it in the code? |
| All times are GMT -4. The time now is 18:21. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.