Author Topic: Fan Not Executing Files?  (Read 675 times)

I get this in the console upon executing it.
Code: [Select]
==>exec("Add-Ons/Vehicle_Fan/Server.cs");
Executing Add-Ons/Vehicle_Fan/Server.cs.
Executing Add-Ons/Vehicle_Fan/fan_Spring.cs.
Executing Add-Ons/Vehicle_Fan/fan_Tire.cs.
Activating package: Fanpkg
 package Fanpkg is already active
OK, but when i change the slightest bit of code, or a model, I don't get why I get this
Code: [Select]
==>exec("Add-Ons/Vehicle_Fan/Server.cs");
Executing Add-Ons/Vehicle_Fan/Server.cs.
ResourceManager::loadStream: 'Fan_Spring.cs' Not in the zip! (Add-Ons/Vehicle_Fan.zip)
exec: invalid script file Add-Ons/Vehicle_Fan/fan_Spring.cs.
ResourceManager::loadStream: 'Fan_Tire.cs' Not in the zip! (Add-Ons/Vehicle_Fan.zip)
exec: invalid script file Add-Ons/Vehicle_Fan/fan_Tire.cs.
Activating package: Fanpkg
 package Fanpkg is already active
For example, if I changed:
Code: [Select]
//Codesnippet
 {
    %target.playThread(2000,SlowDownAni);
%target.startup=0;
 }
//Codesnippet
to:
Code: [Select]
//Codesnippet
 {
    %target.playThread(100,SlowDownAni);
%target.startup=0;
 }
//Codesnippet
I would get that error.
What am I doing wrong?

When you change a ZIP, it has to be "rediscovered", or else you might get some syntax errors.
discoverFile("Add-ons/Vehicle_Fan.zip");
Do this before executing a file. (do it only once after a modification)

Don't put everything in a zip file. Close the game, extract it to a folder (same name "Vehicle_fan") then start it to edit. Alternately you can use the above or setModPaths(getModPaths()); to refresh the directories but that can be glitchy especially if your mod needs to execute before/after certain others.

When you change a ZIP, it has to be "rediscovered", or else you might get some syntax errors.
discoverFile("Add-ons/Vehicle_Fan.zip");
Do this before executing a file. (do it only once after a modification)
Thanks it worked.