Replies: 33 (Who?), Viewed: 1995 times.
Page 2 of 2
Trainee Moderator
staff: trainee moderator
#26 Old 6th Oct 2020 at 2:45 PM
Nice to know that you can name the routing slot whatever you like and use the hash like that
With regards to the errors, it seems like you might have to functions that are called the same thing? And maybe you have defined the PracticeYoga interaction twice, or something like that.

I really wonder why it is crashing, I think it would be worth taking a step back if you haven't already, and just having it display a notification in the Run function or something to start with. If it works fine, try adding in the routing code, and see if your sim successfully routes there, then if everything is all good build up the next parts of your code. 
Having it display debugging notifications after each stage like Lyralei did will mean you can know each line is going well. But if it's crashing to desktop then you won't be able to see them, so that's why I think it would be good to just try out each bit at a time
Lab Assistant
Original Poster
#27 Old 19th Oct 2020 at 2:59 PM
Okay, I managed to find an older version of my code that has no errors and doesn’t crash the game. It ran perfectly fine as well. But this does put me right back where I started before adding a routing slot to my yoga mat...

Could there be an issue with the object I cloned? Maybe the game doesn’t like sims trying to route to that object? It’s the small glass atrium plant from the base game. I’ll have to double check, but I’m pretty sure I changed the flags so you can’t place the mat on a table anymore. That’s the only other thing I can think of right now.
Trainee Moderator
staff: trainee moderator
#28 Old 19th Oct 2020 at 4:51 PM
I'm really not sure what would make the game crash, but by adding one thing at a time, it will either work right, or you will know what it is that's causing the problem
Virtual gardener
staff: administrator
#29 Old 19th Oct 2020 at 7:37 PM
Heya! Would you be able to attach the solution to the thread maybe? That way it's easier to compile it and debug it regarding crashes

But you do want to make sure that the slot you defined in the code is a hashed version in the RIG as well as the RSLT. Although most crashes are *usually* either code related or the bones are somehow corrupted
Lab Assistant
Original Poster
#30 Old 20th Oct 2020 at 2:09 AM
Here's the most recent version. I managed to resolve the two errors I mentioned before, but it still crashes.
Download - please read all instructions before downloading any files!
File Type: rar Alunn_YogaMat.rar (565 Bytes, 4 downloads)
Virtual gardener
staff: administrator
#31 Old 26th Oct 2020 at 12:18 PM
Super late! But Unfortunately I couldn't open the workspace since it's missing the cs files and such. 

Now, rereading the code you've posted, I really think it's a bone or slot that isn't assigned properly. Because the game does tend to throw it's hands up (that is if it had any :p) and possibly screams internally whenever those things aren't fully done properly or return a null value.
Lab Assistant
Original Poster
#32 Old 28th Oct 2020 at 11:13 AM
Sorry about that! I've reuploaded it correctly now and I also included my latest package file.
Download - please read all instructions before downloading any files!
File Type: rar Alunn_YogaMat.rar (9.11 MB, 5 downloads)
Lab Assistant
Original Poster
#33 Old 30th Nov 2020 at 2:59 AM
Well, it’s been a month since my last post and this routing slot is really kicking my ass. I tried using a chair as a base and altering one of those routing slots, but the mod still crashes my game on startup. Any ideas?
Trainee Moderator
staff: trainee moderator
#34 Old 30th Nov 2020 at 2:55 PM Last edited by zoe22 : 30th Nov 2020 at 8:14 PM.
I had a quick look, and I think the problem is with the script. I tried loading the game with the script imported into one of my packages that I know has a working routing slot, as well as the clips and jazz file from your yoga mat package and the game still crashed, but without the script, it loads. 

I know it feels like you're going back on your progress by stripping everything right back, but you're not really because you do have the code written - it's just a matter of singling out what is causing the problem.
I really think it's best to start afresh - keep all your current files in a backup, including your final code, and clone a new object and start with a really basic script.

One thing you could do is actually start with getting the routing slot correct. So first check the object and basic script with a notification to show it's working, then add in the routing slot and in your code route to the slot and put another notification, and check in game. Then if your sim correctly routes to the spot, add in the animations and jazz and add that part of the code and test again.
Then add in the skill gain stuff.

I can investigate further too, but what I have just said is basically what I would try myself. And it's really the only way unless someone can spot specifically what is causing the problem. But that can also take just as long anyway if you're trying loads of different things to fix it :P

EDIT: okay so Actually I think the problem is that when you created your project, you selected .NET Standard instead of .NET Framework :P
So you will either need to start a new project and do all the visual studioey things, or use Sharp Develop again (though I can't help with setting up because I've never used it myself) and copy your code over. And hopefully it should work! 
edit again: the routing slot isn't working for some reason, but at least it doesn't crash! Now the next step is going to be working that out..
Page 2 of 2
Back to top