Jump to content

scripting character item mod [help] please


Recommended Posts

hello all, i an new to scripting and so far i have managed to get my character the way i want her.

 

unfortunately she has an item i cant seem to get to work

the main problem is, it crashing my game when i try to put down that my character will have it in their inventory.

 

I have made a build for it based off of the earmuffs.

i have a prefab script and have changed modmain to reference to the image and scripts. ect ect

 

but when i boot up the game it fails and this is the main cause

 

error calling LoadPrefabFile in mod Mod build sampleadl ([Dark] Zai):
[string "scripts/mainfunctions.lua"]:92: Error loading file prefabs/headphone
 

i dont understand how to fix it to bypass the mainfunctions or what ever it is trying to tell me to fix.

 

 

please can i get some help with this.

Link to comment
Share on other sites

I fixed it myself.

 

Now working on a new problem that i will also fix on my own.

 

thanks any way but please ignore the above post as it is now fixed.

 

(( dont know how to edit the first post or have it removed))

Link to comment
Share on other sites

I fixed it myself.

 

Now working on a new problem that i will also fix on my own.

 

thanks any way but please ignore the above post as it is now fixed.

 

(( dont know how to edit the first post or have it removed))

 

I am a new modder myself, I have found a pretty useful way of troubleshooting, run a search from your start tab:

donotstarve 

 

open the file, you should see a .txt file in there called log 

 

it's a textfile from the autocomplier. It will tell you why there was an error, what line in the .lua file the error occurred, and why it failed. 

 

The next step in my general troublehooting is to take a look at my files and make sure all of my files are in their right folders.

 

and finally I run the scml in Spriter. 

 

Using those steps at least allows me to pin point my problem, so I can get a faster answer on the forums. 

 

Of course part of this process is failing a few times, So new modders like us learn what not to do.  :wilson_ecstatic:

Link to comment
Share on other sites

I am a new modder myself, I have found a pretty useful way of troubleshooting, run a search from your start tab:

donotstarve 

 

open the file, you should see a .txt file in there called log 

 

it's a textfile from the autocomplier. It will tell you why there was an error, what line in the .lua file the error occurred, and why it failed. 

 

The next step in my general troublehooting is to take a look at my files and make sure all of my files are in their right folders.

 

and finally I run the scml in Spriter. 

 

Using those steps at least allows me to pin point my problem, so I can get a faster answer on the forums. 

 

Of course part of this process is failing a few times, So new modders like us learn what not to do.  :wilson_ecstatic:

Thanks for the tip, yeah it turned out to be a very simple mistake and i kicked myself for not noticing it alot quicker than i should have.

 

Now facing another problem altogether of trying to get the item to work right. XD

 

what doesnt kill me in stress will make me a better modder i think, and i am learning pretty well considering i only started two days ago @...@

 

i know next to nothing about scripting.

 

but i shall keep all this is mind for next time, thank you

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
  • Create New...