Results 1 to 5 of 5

Thread: Script errors using the show script errors

  1. #1

    Script errors using the show script errors

    I have started using the -showScriptErrors to see where I can imrove my scripting, but I keep getting script errors coming up for one of the sleep commands in a script and I don't know why.


    ===============================================
    30 setovercast 0;
    sleep 15;
    postRise = ppEffectCreate ["colorCorrections",1500001];

    postRise ppEffectAdjust [ 1, 0.62, 0, [0, 0, 0, 0],[3.12, 0.25, 0.87, 1.26],[-1.11, 0.03, 0.02, 0]];

    postRise ppEffectEnable true;

    postRise ppEffectCommit 30;

    sleep 30;

    postDay = ppEffectCreate ["colorCorrections",1500002];

    postDay ppEffectAdjust [ 1, 0.63, 0, [0, 0, 0, 0],[9.94, -1.76, -0.26, 1.45],[0.58, -0.25, 0.02, 0]];

    postDay ppEffectEnable true;

    postDay ppEffectCommit 10;

    sleep 10;

    postDay ppEffectAdjust [ 1, 0.62, 0, [0, 0, 0, 0],[3.12, 0.25, 0.87, 1.26],[-4.11, 0.03, 0.02, 0]];
    postDay ppEffectCommit 10;

    ============================================
    For some reason I get an error for the first sleep 10;

    '[]sleep 10;'
    error generic error expression name

    I know I must be doing something wrong, but I don't know what.

  2. #2
    Master Sergeant sxp2high's Avatar
    Join Date
    Jul 16 2009
    Location
    nearestLocation [(getPos player), "nameCity"];
    Posts
    607
    No errors with that code... how are you executing it?

  3. #3
    Gunnery Sergeant Koni's Avatar
    Join Date
    Jul 7 2006
    Location
    England
    Posts
    457
    Author of the Thread
    The old way [] exec "scriptName.sqf"

    How do I execute it with the execvm way ?

    That's probably my problem, still use old sqs mixed in with a little sqf
    Last edited by Koni; May 15 2011 at 08:45.

  4. #4
    Master Sergeant sxp2high's Avatar
    Join Date
    Jul 16 2009
    Location
    nearestLocation [(getPos player), "nameCity"];
    Posts
    607
    Don't mix up SQS and SQF.

    Your above code is completely SQF.

    So you gotta call it with:
    nul = execVM "ScriptName.sqf";

  5. #5

Posting Permissions

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