AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   get_distance returning huge ints (https://forums.alliedmods.net/showthread.php?t=9764)

genesis 01-29-2005 19:02

get_distance returning huge ints
 
get_distance problem when i compare to locations like so

new distance = get_distance(oldloc, newloc)

then i do:

client_print(0, print_chat, "Distance Debug: %d", distance)

I get huge numbers back for the distance
Im guessing it has to do with floats ... how can i get floats to show up correctly with decimal points and stuff.

XxAvalanchexX 01-29-2005 19:29

Are your arrays floats or integers? How do you get the values?

genesis 01-30-2005 02:43

arrays are ints i believe functions such as

new origin[3]
get_user_origin(id, origin)

^^ this is the jist but not actual code


All times are GMT -4. The time now is 19:24.

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