Author Topic: Missing file: testing.cs!  (Read 883 times)

Quote from: Console
==>exec("testing.cs");
Missing file: testing.cs!
Does that for any existing file I try to exec, even when it is packaged like an addon
How do I fix

You need a specificy the full filepath not just the filename

exec("Add-ons/Script_Test/testing.cs");
Replace Script_Test with whatever your add-on name is


Or if you put the exec call in a file, you can exec another file in the same directory using exec("./testing.cs");
You may use this if, for example,  you wish to have server.cs exec Addon_name.cs and have all the code in addon_name.cs
(Why the hell do people do that anyways? I've never done it as it seems entirely pointless to me.)
« Last Edit: August 26, 2011, 09:39:10 PM by Headcrab Zombie »

You need a specificy the full filepath not just the filename

exec("Add-ons/Script_Test/testing.cs");
Replace Script_Test with whatever you add-on name is


Or if you put the exec call in a file, you can exec another file in the same directory using exec("./testing.cs");
You may use this if, for example,  you wish to have server.cs exec Addon_name.cs and have all the code in addon_name.cs
(Why the hell do people do that anyways? I've never done it as it seems entirely pointless to me.)
The file is directly in the blockland folder and exec("./testing.cs"); just tells me missing file.
« Last Edit: August 26, 2011, 09:40:51 PM by Scars75 »

You can't exec files in the root folder.

Don't do that.
It also tells me missing file when I exec a script that's packaged correctly. So exec("Add-Ons/Script_Aaaa/server.cs"); does not work.

It also tells me missing file when I exec a script that's packaged correctly. So exec("Add-Ons/Script_Aaaa/server.cs"); does not work.
Then you most likely didn't reference it correctly. Double check your spelling.

Then you most likely didn't reference it correctly. Double check your spelling.
I checked my spelling many times and I'm sure it's correct.

Did you create the file after opening Blockland?
In that case, you need to either restart Blockland, or enter in the console either "setmodpaths(getmodpaths());" or (i think) discoverfile("add-ons/script_aaaa/server.cs");

Other than that the only thing I can think of is that you misspelled something or that you forgot to actually make the .cs file.

Other than that the only thing I can think of is that you misspelled something or that you forgot to actually make the .cs file.
Yeah, make sure you actually made it into a .cs file. You can change a .txt file into a .cs by:

Code: [Select]
File>Save as...
Name the file, change the "Save as type" to "All files"
Add ".cs" to the end of the file. Example: from "Testing" to "Testing.cs"

And then restart blockland so that it discovers the file.

File>Save as...
Name the file, change the "Save as type" to "All files"
Add ".cs" to the end of the file. Example: from "Testing" to "Testing.cs"
Or do what I do and disable 'Hide extensions for known file types'
Then I can just make a new text file and change the file extension.