Script '...' does not contain any valid lines

Discuss and share scripts and script files...
Post Reply
MBaas
Posts: 529
Joined: 15 Feb 2016 21:08

Script '...' does not contain any valid lines

Post by MBaas »

I'm not sure if I'm not following best practices (very possible) or if there is a problem, but here's an annoying thing I've struggled with.
I have two scripts that both need the same utility function. Instead of having that function's code in both scripts, I thought I'd put it into a .xyi file and then just load this file.

So initially that file only looked like:

function foo(){
// some code
}


However, load foo.xyi then failed with a msg "Script 'foo.xyi' does not contain any valid lines". If fixed this by adding a line $a=1; at the bottom - but that can't be the recommended way of dealing with such shared tools - so where's my fault?
______________________________________________
Happy user ;-)

highend
Posts: 13033
Joined: 06 Feb 2011 00:33

Re: Script '...' does not contain any valid lines

Post by highend »

include / include_once
One of my scripts helped you out? Please donate via Paypal or paypal_donate (at) stdmail (dot) de

MBaas
Posts: 529
Joined: 15 Feb 2016 21:08

Re: Script '...' does not contain any valid lines

Post by MBaas »

Indeed. Thanks! :beer:
______________________________________________
Happy user ;-)

Post Reply