Author Topic: I have had a problem trying to execute my first script in blockland  (Read 2751 times)

Today I thought that I should make my very own script. So I went on Torque and followed their directions to make a Test folder with a blank sample.cs in the folder. Then they told me that my script wont activate it unless i activated it. So in the console, I typed, "exec("test/sample.cs");". But then blockland said something about the test folder was not in Blockland's main directory folder. I then tryed to move blockland to where my Blockland's Main Directory folder was supposed to be, which is my Program Files in My Computer. When I launched blockland from that folder, it asked me if I wanted Program Files to be Blockland's main directory folder. I said yes then I tried to execute my script again. But it said the same thing. Can anybody help me?


Badspot seems to have blocked loading scripts from outside Add-On or Configuration folders. You have to pack it the way we do it in Blockland, sir. Also, the topic was only here 12 minutes. Give it time.

Thanks MegaScientifical! Now i can continue my scripting tutorial and I will become a great scripter!

Wait it didn't work. When I read your post I thought that scripts could not be execute anywhere instead of the add-on folder. So i moved my test file to my Add On's folder and i tried to execute it but it didn't work!

You would then need to execute it using the correct path:

exec("add-ons/test/sample.cs");

the console works from the blockland folder, so you must give it a filepath starting from in that folder like fluff, instead of starting from in addons which you did

You would then need to execute it using the correct path:

exec("add-ons/test/sample.cs");
I did what you said in the Blockland Console but then it said "invalid script file name add-ons/test/sample.cs - add ons script must be in folders that follow the <category>_<name> convention."

Try naming it Add-Ons/Script_Testing/sample.cs - that's what the message means

Now I did what SpaceGuy said but then it said Missing File add-ons/Script_Testing/sample.cs!
Is that supposed to happen because my script is blank?

Do you know where the folder is? does the cs file exist? If it does try putting echo("This does exist!"); into it and then execute it. It should print in the console: This does exist!

* MegaScientifical sighs *

I'll just say it even though I really don't want to explain the details: You have to pack it in a .zip file, with the .cs named "client.cs" and a description.txt.

or you can just put the cs file in your base (until ready to be packaged then put it in the addons folder in a zip)

Badspot seems to have blocked loading scripts from outside Add-On or Configuration folders. You have to pack it the way we do it in Blockland, sir. Also, the topic was only here 12 minutes. Give it time.
Wrong.

You can execute any script in any folder, just not the same directory as Blockland.exe.

Wrong.

You can execute any script in any folder, just not the same directory as Blockland.exe.

Ah well, I've recently tried running some scripts in my Add-Ons Log folder (C:\Program Files\Blockland\Add-Ons Log) and it wouldn't let me. Explain that.