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

Another tag mismatch again


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
nG_getwreck
Senior Member
Join Date: Oct 2020
Location: Philippines from South K
Old 03-08-2021 , 00:22   Another tag mismatch again
Reply With Quote #1

Hello, I have tag mismatch error:

PHP Code:
Showcsoxhair(const id, const target) {
    new 
Float:origin[3], Float:hudpos[2];
    
get_user_origin(targetorigin); // This line causes tag mismatch error

    
if (!get_hudmessage_locs(idoriginhudpos))
        
set_hudmessage25500, -1.0, -1.020.20.20.020.02);
    else
        
set_hudmessage0100200hudpos[0], hudpos[1], 20.13.00.020.024);

    
ShowSyncHudMsgidg_iHudSync"\         /^n+^n/         \" );

__________________
nG_getwreck is offline
Celena Luna
Veteran Member
Join Date: Aug 2013
Location: Nagazora
Old 03-08-2021 , 02:55   Re: Another tag mismatch again
Reply With Quote #2

PHP Code:
new Float:origin[3], Float:hudpos[2];
get_user_origin(targetorigin); 
=>

PHP Code:
new origin[3], Float:hudpos[2];
get_user_origin(targetorigin); 
the origin get from get_user_origin is int, not float

for float, you can get from pev
PHP Code:
new Float:origin[3]
pev(idpev_originorigin
it does the same thing but one return float, other return int
p/s: pev can get origin from other entity as well but get_user_origin can only get from player
__________________
My plugin:

Last edited by Celena Luna; 03-08-2021 at 02:57.
Celena Luna is offline
LondoN
Senior Member
Join Date: Dec 2015
Location: Roman, Romania.
Old 03-08-2021 , 14:13   Re: Another tag mismatch again
Reply With Quote #3

Quote:
Originally Posted by Celena Luna View Post
PHP Code:
new Float:origin[3], Float:hudpos[2];
get_user_origin(targetorigin); 
=>

PHP Code:
new origin[3], Float:hudpos[2];
get_user_origin(targetorigin); 
the origin get from get_user_origin is int, not float

for float, you can get from pev
PHP Code:
new Float:origin[3]
pev(idpev_originorigin
it does the same thing but one return float, other return int
p/s: pev can get origin from other entity as well but get_user_origin can only get from player
Code:
//Engine
//entity_get_vector(iIndex, iKey, Float:vRetVector[3])
new Float:origin[3]
entity_get_vector(entid, EV_VEC_ORIGIN, origin)

//Fakemeta
new Float:origin[3]
pev(entid, pev_origin, origin)
for float origins
and use fun for int origins
__________________
LondoN is offline
Celena Luna
Veteran Member
Join Date: Aug 2013
Location: Nagazora
Old 03-08-2021 , 21:31   Re: Another tag mismatch again
Reply With Quote #4

Quote:
Originally Posted by LondoN View Post
Code:
//Engine
//entity_get_vector(iIndex, iKey, Float:vRetVector[3])
new Float:origin[3]
entity_get_vector(entid, EV_VEC_ORIGIN, origin)

//Fakemeta
new Float:origin[3]
pev(entid, pev_origin, origin)
for float origins
and use fun for int origins
well, if you don't like using fakemeta, entity_get_vector also work
__________________
My plugin:
Celena Luna 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 19:25.


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