Jump to content

Recommended Posts

Posted

I am wondering if anyone can help me out. I've been trying to get DCS Witchcraft to work, and I have followed the tutorial to the T, but I keep getting this error message when I start a mission using the script:

 

 

[string "witchcraft.start(_G):1: attempt to call field 'start' (a nil value) stack traceback:
[C]:in function 'start'
[string "witchcraft.start(_G):1: in main chunk

 

I've followed the readme and copied what the video did to the T. I've tried running it on mist 3.3, 3.4 and 3.5, but I keep getting this error message. and the witchcraft.cmd (npm) shows "npm info loaded ok" but program only shows "Waiting for DCS to connect..."

 

Has anyone else had this error, or maybe have an idea of what I am messing up? I am hoping it is something simple I have missed. I've gone through the tutorial and readme over a dozen times just to make sure I have every element implemented properly. I dont know if I am missing a game or windows setting or what I am missing. Any suggestions or help would be appreciated.

Modules: A10C, AV8, M2000C, AJS-37, MiG-21, MiG-19, MiG-15, F86F, F5E, F14A/B, F16C, F18C, P51, P47, Spitfire IX, Bf109K, Fw190-D, UH-1, Ka-50, SA342 Gazelle, Mi8, Christian Eagle II, CA, FC3

Posted

It looks like the dofile(...) line that has been added to MissionScripting.lua is failing.

If it fails this early, the error is not related to MiST. Most likely it can't find the witchcraft.lua file. If it can find the file, there might be a script error during initialization so witchcraft.start never gets defined.

 

Please check dcs.log for errors and/or post it here.

Double-check the location of the witchcraft.lua file (it should be %USERPROFILE%/Saved Games/DCS/Scripts/witchcraft.lua).

 

You could also try to specify an absolute path to the file by replacing (in MissionScripting.lua):

dofile(lfs.writedir()..[[scripts\witchcraft.lua]])

with

dofile([[C:\Path\to\witchcraft.lua]])

Posted

Doh!

 

Thanks for your help! I looked at the dcs.log and figured it out.

 

 

Apparently I am a moron when it comes to github and my witchcraft was corrupt (When I opened up the witchcraft.lua I found out it had extra html code plopped in).

 

:doh:

 

I doubt anyone will have the same silly problem as me, but something to note is that DCS caches .lua scripts in the mission file. Even after I fixed the lua file I kept seeing messages like this:

 

00043.084 ERROR   DCS: Mission script error: : [string "C:\Users\...\AppData\Local\Temp\DCS\/~mis00003D88"]:5: unexpected symbol near '<'

 

So it took me a bit before I realized they were cached in the mission. After I got everything updated, it all worked smooth.

 

 

Thanks for your help! I don't think I would have figured it out if you hadn't replied. :thumbup:

Modules: A10C, AV8, M2000C, AJS-37, MiG-21, MiG-19, MiG-15, F86F, F5E, F14A/B, F16C, F18C, P51, P47, Spitfire IX, Bf109K, Fw190-D, UH-1, Ka-50, SA342 Gazelle, Mi8, Christian Eagle II, CA, FC3

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...