Author Topic: Preload failed  (Read 1761 times)

I'm attempting to make my own skeleton playertype with the little bit of scripting knowledge I have.
(because I know that nobody else will want it) I finally worked out all the syntax errors, but now it says preload failed for skelebody.dts   and I'm not sure why. I'm sure that I entered in the right location for it, and made no spelling errors. Anybody know why this is happening?

post the whole message from your console.log (and include 10-15 lines before and after)
mabye somebody will have an idea.

Code: [Select]
Loading Add-on: Player_skeleton
Executing Add-Ons/Player_skeleton/server.cs
Executing Add-Ons/Player_skeleton/Player_skeleton.cs
Add-Ons/Player_skeleton/Player_skeleton.cs (0): preload failed for Skelebody.dts:
That's what it says in the console when I start a server
Code: [Select]
{
shapeFile = "./shapes/SkeleBody.dts";
emap = false;
doColorShift = True;
colorshiftcolor = "1 1 1 1";
mountPoint = 2;
offset = "0 .02 -1.18";
eyeOffset = "-1 -1 -1";
};
That's where it first says skelebody.dts in the script

For the most part, I was seeing what was in ffc and some other playertype add ons and basing it off that. So I really have no idea why it wouldn't be loading the dts file.

Is it there and is it in a folder called shapes?


so the file is  Blockland\Add-ons\Player_skeleton\shapes\SkeleBody.dts ?

If not, fix the script, or move the .dts file

Also - for testing, you should be working out of a folder and not a zip file.

so the file is  Blockland\Add-ons\Player_skeleton\shapes\SkeleBody.dts ?

If not, fix the script, or move the .dts file

Also - for testing, you should be working out of a folder and not a zip file.
yes, and yes. I would show the whole .cs file but I know there's going to be pointless flamers, and I'm not up to dealing with that atm

well based on what you posted, it looks like something is wrong with your .dts file.
did you make it yourself? or did you get it from somewhere else?

I took it straight from ffc. didn't edit anything about it :/

Put this in after the datablock.

Code: [Select]
echo("SkeleBody Check:" SPC isFile(DatablockName.shapeFile));
Will echo 1 if the file exists, 0 if the file does not exist. If it does not exist, I suggest using a more explicit filepath.
(Add-Ons/Player_Skeleton/shapes/SkeleBody.dts)

If it does exist, then the dts is invalid.

Thx, I'll try that in a bit

Quote
SkeleBody check: 0
:/ I don't think the dts is invalid though, since it works fine with ffc. And I put the dts in a folder called shapes, anybody want to take a look at the script? The only thing I'm sure about with it is that there isn't any Syntax errors. I Copy / pasted most of it since I really don't know too much about scripting, I'm still learning.

as i said, be more explicit.

hmm, I tried making the file location simpler- by placing it in Player_skeleton rather than in shapes. Then I tried making it longer and placed it in shapes/skelebody/dotdts/skelebody.dts. :/  Can I pm you the .cs Iban? I probably did something wrong since I just pasted in what I thought looked important lol

Make the file path exact.

"Add-Ons/Player_Skeleton/shapes/skelebody.dts"