General > Developers Corner

ULib help

(1/1)

BlueNova:
So I'm trying to use the ULib function getPlyByID yet it isn't working

I will try and do the following (My own steam ID used)


--- Code: ---function ULib.getPlyByID( "STEAM_0:0:81970138" )
end
--- End code ---

Yet it always ends in the same error


--- Quote --- <name> or '...' expected near '"STEAM_0:0:81970138"'
--- End quote ---

Some help or pointers in the right direction would be greatly appreciated. Thanks.

iViscosity:
You're feeding the function a string, and even though it's an actual steam id, it's in a string which the function doesn't recognize. You'd need to find the specific player and use the SteamID() function to pass an ID. Basically, a string isn't an ID, even if it is. (does that make sense?)

BlueNova:

--- Quote from: iViscosity on September 08, 2016, 03:47:37 PM ---You're feeding the function a string, and even though it's an actual steam id, it's in a string which the function doesn't recognize. You'd need to find the specific player and use the SteamID() function to pass an ID. Basically, a string isn't an ID, even if it is. (does that make sense?)

--- End quote ---

Yeah, I'll try it that way.

The SteamID() function was a lot more helpful for what I needed. Thanks Viscosity.

Navigation

[0] Message Index

Go to full version