Jump to content
Sign in to follow this  
juleshuxley

Use diag_activeSQFScripts in a function

Recommended Posts

I know I can put diag_activeSQFScripts inside a function. But is it possible to get the line number of the call to that function.                   

lineCalledFrom = { // 1st line
    diag_activeSQFScripts select 0 select 3; // returns 2, but I want to return 5
};

call lineCalledFrom; // 5th line

May be a bit confusing, but as you can see, diag_activeSQF always returns 2 because it's written on the 2nd line. I want it to return the line that `call lineCalledFrom` is written on, in this example 5. Thinking of creating some debugging tools that this would be really useful and awesome.

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  

×