View Single Post
nosoop
Veteran Member
Join Date: Aug 2014
Old 04-15-2019 , 05:43   Re: Argument type mismatch on FloatToString(), even though it should be correct.
Reply With Quote #2

origin is a float[3] array, not a float. A float[3] is another name for a mathematical vector.

If you're meaning to access the first index of the array, use origin[0]. If your intent is to dump all three floats, you'll have to use origin[0], origin[1], and origin[2]. ReplyToCommand takes a format specifier string, so you can use "%f %f %f" and pass in each float in the array at the end like so:

Code:
ReplyToCommand(client, "%f %f %f", origin[0], origin[1], origin[2]);
__________________
I do TF2, TF2 servers, and TF2 plugins.
I don't do DMs over Discord -- PM me on the forums regarding inquiries.
AlliedModders Releases / Github / TF2 Server / Donate (BTC / BCH / coffee)

Last edited by nosoop; 04-15-2019 at 08:52.
nosoop is offline