View Single Post
Author Message
Shadowysn
Senior Member
Join Date: Sep 2015
Location: Location:
Old 04-15-2019 , 05:17   Argument type mismatch on FloatToString(), even though it should be correct.
Reply With Quote #1

PHP Code:
public Action Command_Origin(clientargs)
{
    
float origin[3];
    
char stringy[9];
    
    
GetClientAbsOrigin(clientorigin);
    
FloatToString(originstringysizeof(stringy)); // Troublesome line
    
ReplyToCommand(clientstringy);
    
    return 
Plugin_Handled;

I had one job and I somehow blew it up.

I was creating a one-time plugin to get the origin of a location.
It keeps giving me the argument type mismatch error on the first argument (origin), even though I was seemingly using a float.

Sourcemod is really confusing as the api (plus alliedmods api site) and error system don't really inform me of much, so if 'origin' was something like a vector I wouldn't know.

Last edited by Shadowysn; 04-24-2019 at 07:55.
Shadowysn is offline