nullsystems 0 Posted November 8, 2007 Hi all, I have just tried to use the hint and sidechat ( or groupchat etc ) format and assigning some variables with the players name.... _text=Format["%1 is my name %2 is my game",player, _something] Player groupChat _text However, the problem is %1 comes out as 'WEST 1-1-1A MyNickname' not just my nick, how do I get it to work without the WEST etc? Also, will this method work as im wanting it to in multiplayer, for every person that activates this script, the name is different. Share this post Link to post Share on other sites
nullsystems 0 Posted November 8, 2007 I presume replacing 'player' with 'name player' will work just as I intend? Share this post Link to post Share on other sites
HitmanFF 6 Posted November 8, 2007 This should do it:<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_text=Format["%1 is my name %2 is my game",name player, _something] Share this post Link to post Share on other sites
nullsystems 0 Posted November 8, 2007 Thanks, excellent I thought so. I do have another problem: Im calling this from a script: Quote[/b] ]_suspectbag = name player[_suspectbag, bagbank] exec "Suspect\tracker.sqs" tracker.sqs ----------- Quote[/b] ]_player = _this select 0_marker = _this select 1 hint format["Testing %1 and marker is %2",_player,_marker] "_marker" setMarkerPos (getPos _player) ----------- However this produces an error: Quote[/b] ]Type string, expected object error at (|#|getPos _player) And: The hint format for testing comes out with the name ok, but the secondary %2 comes out as scalar bool error. I presume it cannot getPos someone from the location of their multiplayer / game name? But the other %2 is really confusing. Share this post Link to post Share on other sites
nuxil 2 Posted November 8, 2007 its because. _player = _this select 0 is the same as _suspectbag = name player.. meaning its a string. you cant get the position from a string. "the name of the player" change _suspectbag = name player to just player and it should be alright Share this post Link to post Share on other sites
nullsystems 0 Posted November 8, 2007 Nice explanation thank you. any thoughts on the reason why the _marker returns scalar errors? Share this post Link to post Share on other sites
nuxil 2 Posted November 8, 2007 try replasing "_marker" setMarkerPos (getPos _player) with format["%1",_marker] setMarkerPos (getPos _player) and get rid you you hint line Share this post Link to post Share on other sites
nullsystems 0 Posted November 8, 2007 Interesting setup, looks like it would work but it doesnt do anything. No errors tho. Any other ideas? _suspectbagbank = player [_suspectbagbank,bagbankmarker] exec "Suspect\tracker.sqs" tracker.sqs: Quote[/b] ]_player = _this select 0_marker = _this select 1 format["%1",_marker] setMarkerPos (getPos _player) Share this post Link to post Share on other sites
nuxil 2 Posted November 8, 2007 if i got you right,, you are trying to track a player with a marker ? in that case.. // suspect.sqf _player = player; _marker = "a name"; nil = [_player,_marker] execvm "track.sqf"; // track.sqf _pl = _this select 0; _name = _this select 1; _marker = createMarker [format["%1",_name], getpos player]; while {(alive player)} do { format["%1",_name] setMarkerPos (getpos player); sleep 0.5; }; i think this should work,, have not tested it out , cos im at work Share this post Link to post Share on other sites
nullsystems 0 Posted November 8, 2007 lol I cant believe this, right as you posted I worked out I needed it in quotation marks...im a dumass. I do like the idea of actually creating one on the fly, but ill keep testing. Thanks for your help and nice attitude ( for a change ) lol Share this post Link to post Share on other sites