PDA

View Full Version : Script error log/dumpfile



KaRRiLLioN
Dec 10 2006, 20:44
I'm porting missions over to ArmA, and yes, most of them still use SQS scripts instead of SQF scripts--but I'll get around to that later.

As you can guess, I'm getting a lot of errors since they've changed some functions, i.e. {} for code and call compile for string code.

Is there some way to have Arma dump the errors into a logfile so I can see the entire lines of code that are erroring out?  As it is, most of it runs off the screen so quickly that I can't make it out.

Also, couple of other questions--

I have this line of code:


Quote[/b] ]
call compile format ["%1Obj%2 = TRUE; publicVariable "%1Obj%2"",_side,_ns]


I was using {} inside some of these, but now I have to go to quotes.  Inside this, do I need double quotes now for the publicvariable?  I just can't remember and this particular mission uses a LOT of call compile strings for dynamic variables.

MrZig
Dec 10 2006, 20:47
I do believe inside quotes, you have to use double quotes. It's the same deal in description/config files.

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">call compile format &#91;&#34;%1Obj%2 = TRUE; publicVariable &#34;&#34;%1Obj%2&#34;&#34;&#34;,_side,_ns&#93;[/QUOTE]

Ah, and it makes sense. This is because OFP(or ArmA) think the string ends when it sees a quotation mark followed by somethign else. But when there&#39;s two together, it nows that&#39;s its a string within a string. So yes, you need to use my example.

Lolsav
Dec 10 2006, 21:12
call compile format ["%1Obj%2 = TRUE; publicVariable "%1Obj%2"",_side,_ns]
Without experimenting i noticed something wrong on the format there.

I think it should be:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">call compile format &#91;&#34;%1Obj%2 = TRUE&#34;,_side,_ns&#93;; publicVariable &#34;%1Obj%2&#34;;
[/QUOTE]

MrZig
Dec 10 2006, 21:27
call compile format ["%1Obj%2 = TRUE; publicVariable "%1Obj%2"",_side,_ns]
Without experimenting i noticed something wrong on the format there.

I think it should be:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">call compile format &#91;&#34;%1Obj%2 = TRUE&#34;,_side,_ns&#93;; publicVariable &#34;%1Obj%2&#34;;
[/QUOTE]
What?&#33; Nonono. Why would you put publicvariable after format? Then the engine doesn&#39;t know what %1 and %2 is. %1 and %2 are the variables _side and _ns. That&#39;s why it&#39;s in Format. Your version wont work at all.

MachoMan
Dec 10 2006, 21:40
Unlike in Ofp, scripting errors in ArmA end up in the arma.rpt file.

Lolsav
Dec 10 2006, 21:47
call compile format ["%1Obj%2 = TRUE",_side,_ns]; publicVariable "%1Obj%2";
Well put it inside, but after the first set of "" anyways.
<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">
call compile format &#91;&#34;%1Obj%2 = TRUE&#34;,_side,_ns; publicVariable &#34;%1Obj%2&#34;&#93;;
[/QUOTE]

MrZig
Dec 10 2006, 21:51
call compile format ["%1Obj%2 = TRUE",_side,_ns]; publicVariable "%1Obj%2";
Well put it inside, but after the first set of "" anyways.
<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">
call compile format &#91;&#34;%1Obj%2 = TRUE&#34;,_side,_ns; publicVariable &#34;%1Obj%2&#34;&#93;;
[/QUOTE]
No, that will still not work. Now you&#39;re trying to put that line of code as a %3.

This code WILL work.

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">call compile format &#91;&#34;%1Obj%2 = TRUE; publicVariable &#34;&#34;%1Obj%2&#34;&#34;&#34;,_side,_ns&#93;[/QUOTE]

You need it inside the quotes.

Lolsav
Dec 10 2006, 23:42
The code you input there zig its the one he says it doesnt work...

MrZig
Dec 10 2006, 23:48
The code you input there zig its the one he says it doesnt work...
Look again. I put more quotation marks, so ArmA doesnt confuse it with the string ending.

call compile format ["%1Obj%2 = TRUE; publicVariable <span style='color:red'>""</span>%1Obj%2<span style='color:red'>"""</span>,_side,_ns]

Lolsav
Dec 11 2006, 00:21
ok, hope it works http://forums.bistudio.com/oldsmileys/smile_o.gif