KaRRiLLioN 0 Posted December 10, 2006 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. Share this post Link to post Share on other sites
MrZig 0 Posted December 10, 2006 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] 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. Share this post Link to post Share on other sites
Lolsav 0 Posted December 10, 2006 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"; Share this post Link to post Share on other sites
MrZig 0 Posted December 10, 2006 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"; 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. Share this post Link to post Share on other sites
MachoMan 0 Posted December 10, 2006 Unlike in Ofp, scripting errors in ArmA end up in the arma.rpt file. Share this post Link to post Share on other sites
Lolsav 0 Posted December 10, 2006 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"]; Share this post Link to post Share on other sites
MrZig 0 Posted December 10, 2006 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"]; 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] You need it inside the quotes. Share this post Link to post Share on other sites
Lolsav 0 Posted December 11, 2006 The code you input there zig its the one he says it doesnt work... Share this post Link to post Share on other sites
MrZig 0 Posted December 11, 2006 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] Share this post Link to post Share on other sites
Lolsav 0 Posted December 11, 2006 ok, hope it works Share this post Link to post Share on other sites