This means you are using these variables when either they are not defined or
before they are defined. These specific variables are used by the
lightning_effect() function, so they are probably defined there and you are
including code that uses them before they are defined.
If not you need this in your code somewhere before you use them;
var line_start[3]; // bolt xyz origin
var line_end[3]; // bolts end xyz
On big projects, I create a file called globals.wdl that contains all global
variables, function definitions, sound, image and entity pointers. I include
"globals.wdl" before any other files. This way everything is defined
before use and it also makes it easy to find.