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.
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 ["%1Obj%2 = TRUE; publicVariable ""%1Obj%2""",_side,_ns][/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's two together, it nows that's its a string within a string. So yes, you need to use my example.
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 ["%1Obj%2 = TRUE",_side,_ns]; publicVariable "%1Obj%2";
[/QUOTE]
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 ["%1Obj%2 = TRUE",_side,_ns]; publicVariable "%1Obj%2";
[/QUOTE]
What?! Nonono. Why would you put publicvariable after format? Then the engine doesn't know what %1 and %2 is. %1 and %2 are the variables _side and _ns. That's why it'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.
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 ["%1Obj%2 = TRUE",_side,_ns; publicVariable "%1Obj%2"];
[/QUOTE]
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 ["%1Obj%2 = TRUE",_side,_ns; publicVariable "%1Obj%2"];
[/QUOTE]
No, that will still not work. Now you'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 ["%1Obj%2 = TRUE; publicVariable ""%1Obj%2""",_side,_ns][/QUOTE]
You need it inside the quotes.
The code you input there zig its the one he says it doesnt work...
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]
ok, hope it works http://forums.bistudio.com/oldsmileys/smile_o.gif
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.