Hi there! You are currently browsing as a guest. Why not create an account? Then you get less ads, can thank creators, post feedback, keep a list of your favourites, and more!
A Sinful Sim
retired moderator
Original Poster
#1 Old 8th Apr 2006 at 11:35 AM
Default "Stack number out of range" error
I'm sure someone at some point asked this question but I couldn't find it via search (I swear this site needs a better search engin.)

I'm getting the "Stack number out of range" message and can't find any info on what causes this message or how to fix it. I was doing so well too..lol figured out how to make my object "Employee Only" and how to have the ability to assign an employee to it. Then I try to add another feature and get stuck with this error. Do I need to edit something in the object data like when the "attribute number out of range" error message happens?

Thanks

Adult Downloads Can Be Found On MTS2's Adult Site!!!
Advertisement
Retired Duck
retired moderator
#2 Old 8th Apr 2006 at 11:45 AM
More often then not, that message means that you're using a local variable or reading a parameter that doesn't exist. If you're using PJSE, there's a couple of text boxes on the top right that say "Arg Count" and "Local Var Count". Make sure you've got enough arguments and local variables defined there for the ones your using.
One horse disagreer of the Apocalypse
#3 Old 8th Apr 2006 at 11:57 AM
My memory is vague, but I think that particular error is when your line says something like "Stack Object ID 0x0001" ie a number other than 0. I don't know if there is a context where it is correct to have a non-zero value for Stack Object, but I have never had it accepted by the game.

"You can do refraction by raymarching through the depth buffer" (c. Reddeyfish 2017)
A Sinful Sim
retired moderator
Original Poster
#4 Old 8th Apr 2006 at 11:57 AM
ty Echo... yes I'm using the PJSE... I always thought that came standard with SimPE but apparently not from what I've been reading. Looks like I'm missing the Arg Count. I'll have to go try it. Didn't realize those two things changed node to node.

Hmmm.. I actually have another command I used that has 2 Args and that works fine. So maybe it's not the Arg Count (which is set to 0 by the way). Well, atleast now I have some direction to try to experiment with. Thanks Echo.

Adult Downloads Can Be Found On MTS2's Adult Site!!!
A Sinful Sim
retired moderator
Original Poster
#5 Old 8th Apr 2006 at 3:23 PM
Quote: Originally posted by atavera
I don't think that it could be a local var(maybe not even an arg?), because theres a seperate error for those, Local out of range, and even seperate ones for out of range slots and attributes. I'm not sure if theres also one specificly for args, but it sounds more like what Inge suggested.

Oh also I made an article in the wiki with a list of all the possible error messages(from TheSims2.exe)(unless there were new ones with EPs) and put explanations on a few, but I don't think anyone reads the wiki. Maybe I should make a real post about those. I initially thought the wiki was for general modding kinds of things so I used it that way... but later saw it was more for filetype decoding etc.

Edit: Actually theres a seperate one Stack Object out of range(probably what Inge said), so maybe stack number does refer to the args as I don't see any errors that say called 'argument' or 'parameter' out of range.


Ahh.. so you put the list on the wiki... yes I have seen it and refered to it a few times (altho it is very lacking in explanations...sorry... actually refered to it for this error but didn't find anything.)

Anyways... here's where I stand. I changed the Arg count from 0 to 2 and the program atleast started to run the bhav. Unfortunatly, I ended up getting tons of error messages in the global bhav I was trying to access..lol And now I'm not even sure if that's the bhav I should be using or not. All I want to do is have the sim return to the clothes they were wearing before they interacted with my object that way employees could return to wearing their normal uniform (if set). I normally use the "get dressed for public" bhav but that makes the sim automatically change into their "everyday" clothes.

But it's almost 10:30 a.m here and I'm gonna be heading to bed soon so I'll have to work on it later tonight.

Adult Downloads Can Be Found On MTS2's Adult Site!!!
A Sinful Sim
retired moderator
Original Poster
#6 Old 9th Apr 2006 at 2:56 AM
I was trying that shortly before I went to bed this morning but couldn't get it to work.

I tried

To store the data:
Temp 02 := My Person data (current Outfit)

To retrive the data
My person data (current Outfit) := temp 02

And also (figuring maybe I had to use a literal number)

Literal 0x0001 := my person data (current Outfit)
My person data (current Outfit) := Literal 0x0001

Oh crap...lol I probably have to use = instead of := to retrieve the data, right? I think I have to start giving myself breaks when working on projects instead of working straight through from 10 p.m. to 10 a.m. My brain must end up getting tired.

But well, the "Stack Number out of range" info will help me add another feature into one my previous objects. I orginally gave up on it because I couldn't figure it out. So this thread won't necessaryly go to waste

As for the wiki, I doubt many people know of the "Object Errors" page. I ended up stumbling across it via google (only once) and saved the link. So that also may be why no one else ever updated it. I wonder how many people even visit the wiki any more. That infomation may be better suited in the "Modding Info Center" on the actual site.

Adult Downloads Can Be Found On MTS2's Adult Site!!!
Retired Duck
retired moderator
#7 Old 9th Apr 2006 at 3:16 AM
Well I can tell you that "Literal 0x0001 := my person data (current Outfit)" will cause something to break at the very least. You can't store anything in a literal, it's not a storage space but a number. As to why the temp didn't work, I'm not sure. It's most likely related to something else that's going on in the code at the same time, and not just the code you've pasted here.
A Sinful Sim
retired moderator
Original Poster
#8 Old 9th Apr 2006 at 4:48 AM
Thanks for the help guys/gals but apparently this is a little more complex...lol

I tried Atavera's suggestion and it sort've worked. I've been testing it out using Employee's (since that's basically the main reason I want the clothes changeing to be this way) and unfortuantly, it doesn't work. Just out of a hunch I decided to try it with the owner of the store. I bought a dresser and had the him change from his everyday wear to underwear and then had him use the object (which changed his clothing while in use). After he was done, he did change back in to his underwear. So apparently uniforms are reguarded differently than normal clothing because employees still change back to their everyday clothes instead of their uniforms. Why did Maxis have to do this ? I wonder how pre OFB work clothes were reguarded by the game.

Adult Downloads Can Be Found On MTS2's Adult Site!!!
A Sinful Sim
retired moderator
Original Poster
#9 Old 9th Apr 2006 at 5:22 AM
I opened up the Jobglobal semi global things and found a command that said

[prim 0x0079] Change Outfit (Sim: My 0x000B (object id); rebuild current outfit; source: the sim's outfits,
outfit: Casual 1,
clearing GUID pointers in person data fields,
don't save change)

So this does sound like what you are talking about. Well, atleast it mentions GUID..lol One of the options to change in the operandas is to have the sorce be a GUID. So I'm gonna go mess around with this now. I did try one thing... I used that node except I changed the "casual 1" to "Try On - For Temp Outfits" figuring the uniforms would be Temp Outfits. It didn't work on the employees but ended up putting my owner in his swimming trunks for some reason.

Adult Downloads Can Be Found On MTS2's Adult Site!!!
A Sinful Sim
retired moderator
Original Poster
#10 Old 9th Apr 2006 at 8:31 AM
well, finally figured out a way to get the results I want but it's not the best way. It probably goes against someone's "rules of modding" because it involves purposely causing an error but it works.

Right before the program hits the change outfit section I'm going to have to check if the sim is an employee. If it's not then I'll use the command Atavera suggested since that worked for non-employees. If it is a employee I'm gonna have to redirect it to the Bhav "Social - Business - Manage - Change Into Outfit" that I found in one of the non-object semi-globals. Then when this Bhav hits an error, the employee simply changes back into the uniform and leaves the object.

Odd thing is there is no visible "I've hit an error" animation with employees but there is with a non-employee. Non-employees (when they use this command) do play one of the "I've hit an error" animations. Go figure. Another odd thing is if the Bhav doesn't hit an error, the employee will get dressed in their Everyday clothing. There is nothing after that section that would cause that to happen.

I know I've read somewhere that some of Maxis' objects hit errors (which is why you shouldn't play with boolProp constantly on) so I'm assuming purposely hitting an error isn't the end of the world. I've only given it a short testing but haven't come across any thing odd or wrong after using the object. So well, figured I'd let ya know I found a solution

Adult Downloads Can Be Found On MTS2's Adult Site!!!
A Sinful Sim
retired moderator
Original Poster
#11 Old 10th Apr 2006 at 1:45 AM
well, whatever works...lol It's the only Bhav I've used that when it errors they return to their uniform. Any other time an error happened (on accident) they always changed into their Everyday clothes. So obviously it's a "special" Bhav

Adult Downloads Can Be Found On MTS2's Adult Site!!!
Back to top