Jump to content
Sign in to follow this  
Insnee

Variable is changing itself

Recommended Posts

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

[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 by dr_strangepete

Share this post


Link to post
Share on other sites

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

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

Aye. It's generally good to declare private variables in some scope or another.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×