Insnee 10 Posted November 6, 2014 My brain is killing me, I dont know why this is happening.. code: http://i.gyazo.com/7b1a224cb972bc5743fc499c079ed4e4.png output rpt: http://pastebin.com/raw.php?i=RaiTbU4C note: TDC_messageTo is printing the parameters to rpt the problem here: 22:43:24 " ##Debug## TDC_fnc_messageTo >> [b Alpha 1-1:1 (Lt. Insane),"Feldkrankenstation",["deine Behandlung wurde erfolgreich abgeschlossen"]]" _unit should be in this case: [b Alpha 1-1:2 (OLt. Truppenkasper) REMOTE, but for any reason, it is not?! Greetings, (annoyed) Insane Share this post Link to post Share on other sites
dr_strangepete 6 Posted November 6, 2014 (edited) [edit] on second thought, i'm not really sure whats going on....sorry....perhaps including the TDC_fnc_messageTo function would help. could it be leaking variables when run? Edited November 6, 2014 by dr_strangepete Share this post Link to post Share on other sites
Insnee 10 Posted November 7, 2014 TDC_fnc_messageTo is working as "proxy" script and does some small things with the text, but not with the unit http://pastebin.com/raw.php?i=j7qB7pJH Share this post Link to post Share on other sites
dr_strangepete 6 Posted November 7, 2014 As good measure, try adding private ["_unit", ...etc] declarations to your scripts at the top. It seems possible variables are leaking through (for example _unit is used in both the code above and messageTo) This script is quite layered, you are further calling cse_fnc_sendDisplayInformationTo i see, could that be the source of trouble? It sounds like the meat of your function. You might want to consider adding debugging code throughout your whole script dumping all variables at every stage, every line, and compare step by step, loop by loop; the painful way. Its difficult to help on this end when there is apparently more going on than just the front ends shown. Share this post Link to post Share on other sites
Insnee 10 Posted November 7, 2014 With private[] it seems to work now! Thanks, never though that could be a problem .. ^^ Share this post Link to post Share on other sites
iceman77 18 Posted November 7, 2014 Aye. It's generally good to declare private variables in some scope or another. Share this post Link to post Share on other sites
Insnee 10 Posted November 7, 2014 Another question, is there an easier way than this to get the owner ID of the unit opposite yourself? (line 43) https://github.com/TDC-Clan/A3-MissionTemplate/blob/e6c0403cda69aaec90f10d55335bb583a41ec36c/MissionTemplate.Bornholm/addons/CSE/fn_actionHeal.sqf and the function https://github.com/TDC-Clan/A3-MissionTemplate/blob/e6c0403cda69aaec90f10d55335bb583a41ec36c/MissionTemplate.Bornholm/core/functions/fn_getOwner.sqf Share this post Link to post Share on other sites