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

Solved tag mismatch


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
DjSoftero
Veteran Member
Join Date: Nov 2014
Location: Lithuania
Old 09-24-2017 , 06:04   tag mismatch
Reply With Quote #1

oh god, those tag mismatches gave me a headache already...
so i was trying to get the ratio of player current speed compared to maxspeed.
in other words: current speed/maxspeed/100
and as in code:
PHP Code:
#define GSPEED 80.0
#define INVIS 70
public client_PreThink(id) {
    if(!
is_user_alive(id) || id == catcher || !round)
        return 
PLUGIN_CONTINUE
    
    
static float:velocity[3]
    
    
pev(idpev_velocityvelocity)
    
    
set_user_rendering(id,kRenderFxNone,0,0,0,kRenderTransAlphafloatround(vector_length(velocity)/GSPEED/100.0*(INVIS/100.0)))
    return 
PLUGIN_CONTINUE

the thing that gives me error is vector_lenght(velocity) cuz if i replace it with 100 or 100.0 everything is legit.
__________________
retired chump

Last edited by DjSoftero; 09-24-2017 at 06:14.
DjSoftero is offline
aron9forever
Veteran Member
Join Date: Feb 2013
Location: Rromania
Old 09-24-2017 , 06:08   Re: tag mismatch
Reply With Quote #2

if you google the function you will see it returns a Float
https://www.amxmodx.org/api/vector/vector_length

so no, that's not the problem, it's INVIS that should be 70.0
__________________
Meanwhile, in 2050:
Quote:
Originally Posted by aron9forever
useless small optimizations
Quote:
Originally Posted by Black Rose View Post
On a map that is 512x512x128 units you end up with 3,355,443,200,000 different "positions". To store each one of those positions individually in the variable "user_or" you need 12 terabytes of memory.
aron9forever is offline
DjSoftero
Veteran Member
Join Date: Nov 2014
Location: Lithuania
Old 09-24-2017 , 06:12   Re: tag mismatch
Reply With Quote #3

i tried making it 70.0 before. it still give tag mismatch
wait i didnt. sry and ty
__________________
retired chump

Last edited by DjSoftero; 09-24-2017 at 06:13.
DjSoftero is offline
klippy
AlliedModders Donor
Join Date: May 2013
Location: Serbia
Old 09-24-2017 , 06:15   Re: tag mismatch
Reply With Quote #4

Your velocity is tagged with float: instead of Float:.

Quote:
Originally Posted by aron9forever View Post
so no, that's not the problem, it's INVIS that should be 70.0
That shouldn't be a problem.

Last edited by klippy; 09-24-2017 at 06:16.
klippy is offline
DjSoftero
Veteran Member
Join Date: Nov 2014
Location: Lithuania
Old 09-28-2017 , 04:08   Re: tag mismatch
Reply With Quote #5

Quote:
Originally Posted by KliPPy View Post
Your velocity is tagged with float: instead of Float:.


That shouldn't be a problem.
ty.
__________________
retired chump
DjSoftero 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 00:58.


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