Post new topic    
Liquid Metal Slime
Send private message
Teleport Items 
 PostSun Aug 15, 2010 11:35 pm
Send private message Reply with quote
I've posted the same topic on Castle Paradox.

I'm working on an item for my game that will teleport the user back to the beginning of a dungeon. What I've done is a create an item that opens a text box. This text has a "use door" command that warps the player to a door I've created at the beginning of the dungeon.

However, during the game, whenever I use the item from my inventory menu (it's not usable during battle) it brings up a script error that says "Script Error!" "remove_menu: invalid slot -1" "Funny...no scripts running!"

If I hit ignore, it warps back to the beginning of the dungeon like it's supposed to. How do I prevent this error from occurring? Or is there another way to make this item?

To clarify, I'm trying to use it on the same map where it should warp to. I'm not trying to warp between maps.
Super Slime
Send private message
 
 PostMon Aug 16, 2010 1:06 am
Send private message Reply with quote
To be clear, you're not using any scripts here, right? This sounds more like an engine error than anything you're doing wrong.
Mega Tact v1.1
Super Penguin Chef
Wizard Blocks
Reigning Smash Champion
Send private message
 
 PostMon Aug 16, 2010 1:09 am
Send private message Reply with quote
JSH was having similar problems the other day. I couldn't figure out what was wrong with his script and it seemed like an engine bug there too.
<TheGiz> oh hai doggy, oh no that's the straw that broke tjhe came baclsb
Liquid Metal Slime
Send private message
 
 PostMon Aug 16, 2010 2:27 am
Send private message Reply with quote
No, I'm not using any scripts.

Interestingly, I tried making an item that just displays a text box, not to warp any place. Basically it's a consumable item that displays a text box when used outside of battle. There are no conditionals, scripts, or choices on the box. I get the same error.

It seems it has nothing to do with the door command. Something about displaying a text box is hanging it up. Any ideas? Surely items are able to display text boxes, right?
Super Slime
Send private message
 
 PostMon Aug 16, 2010 5:00 am
Send private message Reply with quote
Yes, it's an engine error. Don't worry about it for now.

James will likely fix it when he catches wind of this thread.
Mega Tact v1.1
Super Penguin Chef
Wizard Blocks
Liquid Metal King Slime
Send private message
 
 PostMon Aug 16, 2010 8:08 pm
Send private message Reply with quote
I am not able to reproduce this bug with the current nightly builds.

What version are you using? Ypsiliform stable? Or a nightly build?

Can somebody make a simple test case that demonstrates this bug?
Liquid Metal Slime
Send private message
 
 PostTue Aug 17, 2010 12:43 am
Send private message Reply with quote
I'm "using ypsiliform+2 200100208".

Okay, I went ahead and made a new game for the purpose of testing the bug. I made 1 map with 1 NPC (a tile that gives out this "test" item). I made 1 item called "test". It is consumable and displays a text box when used outside of battle. I start the game up, get the item, and use it. Everything works like it should.

Now I go back to my actual game and do the exact same thing, but it gives me the same error message I've been getting. I've checked in my "General Data" all the preferences bitsets are the same. I have no scripts. Both games are set to "display all warning message". If I choose to ignore the error message, the text displays fine. I'm stumped!
Liquid Metal King Slime
Send private message
 
 PostTue Aug 17, 2010 12:46 am
Send private message Reply with quote
Strange.

Would you mind sending me a copy of your game?
Liquid Metal Slime
Send private message
 
 PostTue Aug 17, 2010 2:07 am
Send private message Reply with quote
Sure. I just uploaded it to:

http://www.mediafire.com/?61x0o55f7fyo8s6

Or I can e-mail you a copy if you'd prefer. I've include game.exe so that you can run the game with the version I'm using.

Once you open coffin.rpg, start a new game. Right beside you should be a gray square door. Step on it an item called "test" will appear in your inventory. Use "test" and the error message will appear.

In OHRRPGCE "test" is item #48. The text box it references is text box #132. The NPC that gives you the item is NPC #69 on map 0. Tell if you need any other info.

And thanks so much for trying to help.
Liquid Metal King Slime
Send private message
 
 PostWed Aug 18, 2010 3:43 pm
Send private message Reply with quote
I figured it out.

When you use an item that triggers a text box, the menu that opened the inventory screen is closed. If the menu item that opened the inventory screen also had the "Close menu if selected" bitset turned on, then it would make a second attempt to close the menu after it was already closed.

The nightly build script had died a couple days ago, so I just restarted it. You can test with current nightly builds
Liquid Metal Slime
Send private message
 
 PostThu Aug 19, 2010 1:17 am
Send private message Reply with quote
Awesome! Thanks so much for your help! I never would have found that. I wasn't aware that you could edit bitsets for menu items.

I'm not sure what I can do to repay you, but if you need help to play test a game or something I'll be happy to give you hand.

Thank again!
Liquid Metal King Slime
Send private message
 
 PostThu Aug 19, 2010 1:37 am
Send private message Reply with quote
The fact that you are making and sharing a game is payment enough :)
Display posts from previous: