Raised This Month: $ Target: $400
 0% 

wierd results from get_distance


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
VEN
Veteran Member
Join Date: Jan 2005
Old 02-21-2007 , 08:05   Re: wierd results from get_distance
Reply With Quote #1

Author, can you show us how exactly to reproduce the issue?
VEN is offline
genesis
Senior Member
Join Date: Oct 2004
Location: CALIFORNIA, USA
Old 02-25-2007 , 15:42   Re: wierd results from get_distance
Reply With Quote #2

Sure, here is a simple plugin that gives me the problem

to test go load plugin go into game and say /testdistance and it will tell you your distance to the arbitrary point (150, 150, 150)

which comes out gibberish.
Attached Files
File Type: sma Get Plugin or Get Source (test.sma - 665 views - 674 Bytes)
__________________
CS 1.6 cali.radclan.net:27015
I have a feeling we're not in cs anymore.
I take pride that all my AMXX plugins were writen in notepad.
genesis is offline
stupok
Veteran Member
Join Date: Feb 2006
Old 02-25-2007 , 17:56   Re: wierd results from get_distance
Reply With Quote #3

This
Code:
fvec[0] = Float:pvec[0]
should be:
Code:
fvec[0] = float(pvec[0])
stupok is offline
genesis
Senior Member
Join Date: Oct 2004
Location: CALIFORNIA, USA
Old 02-25-2007 , 19:02   Re: wierd results from get_distance
Reply With Quote #4

Quote:
Originally Posted by stupok69 View Post
This
Code:
fvec[0] = Float:pvec[0]
should be:
Code:
fvec[0] = float(pvec[0])
the line of code is a valid line and "somewhat" equivalent to the line you're using, its a matter of programmer preference. I prefer to use type casting, and if that is causing the problem then I understand but then there is a still a problem...
__________________
CS 1.6 cali.radclan.net:27015
I have a feeling we're not in cs anymore.
I take pride that all my AMXX plugins were writen in notepad.
genesis is offline
stupok
Veteran Member
Join Date: Feb 2006
Old 02-25-2007 , 23:51   Re: wierd results from get_distance
Reply With Quote #5

You may be right, I wasn't aware that Float: could be used like that. I haven't tested the plugin at all, though.
stupok is offline
Orangutanz
Veteran Member
Join Date: Apr 2006
Old 02-26-2007 , 09:12   Re: wierd results from get_distance
Reply With Quote #6

Try it with %u instead of %f, might need to convert it from Float -> Integer 1st.

I submitted an issue months ago which is similar to your issue. My request was due to large bitwise number(s): [REQ] Core
__________________
|<-- Retired from everything Small/Pawn related -->|
You know when you've been Rango'd
Orangutanz 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 00:35.


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