Author Topic: I cant exec in console!  (Read 811 times)

Hey guys, so I am trying to edit a player type to learn how to code for fun.

So I made a player type, and then went into the Player_Psyche.cs and edited the jetEnergyDrain value from 2 to 1. and now when I enter exec("Add-Ons/Player_Psyche/server.cs"); it wont execute. it says ResourceManager::loadStream: 'server.cs' Not in the zip! (Add-ons/Player_Psyche.zip)
exec: invalid script file Add-ons/Player_Psyche/server.cs.

Executing it works before I make an changes.. HELP??


If you are changing/executing zipped files on the fly, you need to do this first:
Code: [Select]
discoverFile("Add-ons/Player_Psyche.zip");
//OR
setModPaths(getModPaths());

However, I recommend doing all of your modding work using non-zipped folders. It makes executing changes much easier.

If you are changing/executing zipped files on the fly, you need to do this first:
Code: [Select]
discoverFile("Add-ons/Player_Psyche.zip");
//OR
setModPaths(getModPaths());

However, I recommend doing all of your modding work using non-zipped folders. It makes executing changes much easier.

Adding on to this, if you're working with single-file scripts then I usually work with them in config to make them easy to execute. Plus, if you have a file named main.cs in config, it automatically executes on launch, I believe before the client add-ons load? I used it to load the mission editor but you can also have it check launch parameters and such.

Plus, if you have a file named main.cs in config, it automatically executes on launch, I believe before the client add-ons load? I used it to load the mission editor but you can also have it check launch parameters and such.
Wow, that loads before the base scripts even load. It must be left over from the old -mod parameter. Thanks.

Try not using a zip
What do you mean? Just have the files in a folder named Player_Psyche?

What do you mean? Just have the files in a folder named Player_Psyche?
Yeah don't use a .zip just try a folder.

Adding on to this, if you're working with single-file scripts then I usually work with them in config to make them easy to execute. Plus, if you have a file named main.cs in config, it automatically executes on launch, I believe before the client add-ons load? I used it to load the mission editor but you can also have it check launch parameters and such.
woah I did not know that

Yeah don't use a .zip just try a folder.
This seems to have worked. Does anybody know of any guides for making player types?