MAD T 16 Posted February 20, 2011 (edited) Hi everyone. I have a question about onPlayerDisconnected. When i use it like this, onPlayerDisconnected "[_id, _name, _uid] execVM "PlayerDisconnected.sqf"; _uid always gives me a number like 1.4253e+006 which is actualy the player ID but just with some zeros added to the end. I know from the wiki page that the value is returned in a float format. _uid = getPlayerUID vehicle player; getPlayerUID Gives me the player ID in a correct format like 942107. For example if i want to compare these both values how do i get the one from onPlayerDisconnected in a correct format? Other question. What purpose or use does the float value has? Any help is much appreciated on this. Edited February 20, 2011 by MAD T Share this post Link to post Share on other sites
Bon 12 Posted February 20, 2011 I know from the wiki page that the value is returned in a float format. I would like to know to what wiki you are referencing here. _uid in onplayerdisconnected returns the same value as getplayeruid does, your problem is something else. Be advised, if this is all the code you use regarding to onplayerdisconnected, you messed with the quotes: onPlayerDisconnected [color="Blue"]"[/color][_id, _name, _uid] execVM [color="Red"]'[/color]PlayerDisconnected.sqf[color="Red"]'[/color];[color="Blue"]"[/color]; Share this post Link to post Share on other sites
MAD T 16 Posted February 20, 2011 (edited) Im sry i misread something on the wiki. Your right it gives me the correct ID in a number value and getPlayerUID gives me a string. My question should be rather how do i convert numbers to a string :o I was just confused about the value it gave me because my ID is 7 numbers long. Thanks for your help anyway. Edited February 20, 2011 by MAD T Share this post Link to post Share on other sites
Bon 12 Posted February 20, 2011 Alright you can either parse a string for a number using parseNumber or you can convert anything to a string using str or format. Share this post Link to post Share on other sites
MAD T 16 Posted February 20, 2011 Thanks mate, you helped me alot. Share this post Link to post Share on other sites