Raised This Month: $32 Target: $400
 8% 

Help please


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
raizo11
BANNED
Join Date: Dec 2013
Location: https://t.me/pump_upp
Old 03-03-2018 , 07:14   Help please
Reply With Quote #1

x.sma(846) : warning 213: tag mismatch

This line : set_user_origin(index, iOrigin);

Code:
stock set_iAngle(index, Float:iAngle[3], Float:iOrigin[3])
{
   entity_set_vector(index, EV_VEC_angles, iAngle); 
   entity_set_int(index, EV_INT_fixangle, 1);
   set_user_origin(index, iOrigin);
}

Last edited by raizo11; 03-03-2018 at 07:16.
raizo11 is offline
Send a message via ICQ to raizo11 Send a message via AIM to raizo11 Send a message via MSN to raizo11 Send a message via Yahoo to raizo11 Send a message via Skype™ to raizo11
E1_531G
Senior Member
Join Date: Dec 2017
Old 03-03-2018 , 07:26   Re: Help please
Reply With Quote #2

set_user_origin() expects Int array as the 2nd arg.
__________________
My English is A0

Last edited by E1_531G; 03-03-2018 at 07:26.
E1_531G is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 03-03-2018 , 09:07   Re: Help please
Reply With Quote #3

FVecIVec or use set_pev.
__________________
HamletEagle is offline
Clauu
Senior Member
Join Date: Feb 2008
Location: RO
Old 03-03-2018 , 09:08   Re: Help please
Reply With Quote #4

Depending on what are you trying to achieve, for float origin you can use either set_pev or fm_entity_set_origin
Clauu is offline
raizo11
BANNED
Join Date: Dec 2013
Location: https://t.me/pump_upp
Old 03-03-2018 , 11:39   Re: Help please
Reply With Quote #5

i tried

engfunc ( EngFunc_SetOrigin, index, iOrigin)
fm_entity_set_origin(index, iOrigin)
set_pev(index, pev_origin, iOrigin)

All three change my coordinates
raizo11 is offline
Send a message via ICQ to raizo11 Send a message via AIM to raizo11 Send a message via MSN to raizo11 Send a message via Yahoo to raizo11 Send a message via Skype™ to raizo11
edon1337
Penguin Enthusiast
Join Date: Jun 2016
Location: Macedonia
Old 03-04-2018 , 09:40   Re: Help please
Reply With Quote #6

Quote:
Originally Posted by raizo11 View Post
engfunc ( EngFunc_SetOrigin, index, iOrigin)
fm_entity_set_origin(index, iOrigin)
set_pev(index, pev_origin, iOrigin)

All three change my coordinates
And what do you expect them to do?
__________________

Last edited by edon1337; 03-04-2018 at 09:40.
edon1337 is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 03-04-2018 , 09:55   Re: Help please
Reply With Quote #7

Quote:
Originally Posted by raizo11 View Post
i tried

engfunc ( EngFunc_SetOrigin, index, iOrigin)
fm_entity_set_origin(index, iOrigin)
set_pev(index, pev_origin, iOrigin)

All three change my coordinates
Your original question was the tag mismatch you are getting on set_user_origin(). This is a result of passing a Float array to a function that expects an integer (no tag) array.

As a solution you were provided alternate methods of setting the origin which can take a Float as a parameter.

You were also given a way to eliminate the warning while still using set_user_origin().
Code:
stock set_iAngle(index, Float:iAngle[3], Float:iOrigin[3]) {     entity_set_vector(index, EV_VEC_angles, iAngle);     entity_set_int(index, EV_INT_fixangle, 1);    
    new origin[ 3 ]
    FVecIVec( iOrigin , origin );
    set_user_origin(index, origin);
}

If it was me, I would use this:
PHP Code:
stock set_iAngleindex Float:fAngle] , Float:fOrigin] )
{
    
entity_set_vectorindex EV_VEC_angles fAngle ); 
    
entity_set_intindex EV_INT_fixangle );
    
entity_set_vectorindex EV_VEC_origin fOrigin );

__________________

Last edited by Bugsy; 03-04-2018 at 09:57.
Bugsy 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 01:26.


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