Results 1 to 10 of 10

Thread: Script error log/dumpfile

  1. #1
    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 Originally Posted by [b
    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.
    _____________________________________________
    Visit the BootCamp ArmA 2 CO server: 66.239.221.141
    Bandwidth: 20 mbps
    Hardware: HP DL360G5 Dual-Core Xeon @ 3Gz /2GB RAM
    _____________________________________________

  2. #2
    Sergeant Major
    Join Date
    Dec 24 2002
    Location
    BC, Canada
    Posts
    1,428
    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.




  3. #3
    Quote Originally Posted by (KaRRiLLioN @ Dec. 10 2006,22:44)
    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]

  4. #4
    Sergeant Major
    Join Date
    Dec 24 2002
    Location
    BC, Canada
    Posts
    1,428
    Quote Originally Posted by (Lolsav @ Dec. 10 2006,15:12)
    Quote Originally Posted by (KaRRiLLioN @ Dec. 10 2006,22:44)
    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.

  5. #5
    Unlike in Ofp, scripting errors in ArmA end up in the arma.rpt file.

  6. #6
    Quote Originally Posted by (MrZig @ Dec. 10 2006,23:27)
    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]

  7. #7
    Sergeant Major
    Join Date
    Dec 24 2002
    Location
    BC, Canada
    Posts
    1,428
    Quote Originally Posted by (Lolsav @ Dec. 10 2006,15:47)
    Quote Originally Posted by (MrZig @ Dec. 10 2006,23:27)
    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.

  8. #8
    The code you input there zig its the one he says it doesnt work...

  9. #9
    Sergeant Major
    Join Date
    Dec 24 2002
    Location
    BC, Canada
    Posts
    1,428
    Quote Originally Posted by (Lolsav @ Dec. 10 2006,17:42)
    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]




  10. #10
    ok, hope it works

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •