function show_inventory_window not working

Started by mport2004, Fri 11/03/2005 17:18:58

Previous topic - Next topic

mport2004

in my game im dident even click on the code for
function show_inventory_window
and it was working fine but now when i try to save this comes up.

nested functions not supported

and this is the script


function show_inventory_window () {
  // This demonstrates both types of inventory window - the first part is how to
  // show the built-in inventory window, the second part uses the custom one.
  // Un-comment one section or the other below.
 
  // ** DEFAULT INVENTORY WINDOW
InventoryScreen();
/* 
  // ** CUSTOM INVENTORY WINDOW
  GUIOn (INVENTORY); 
  // switch to the Use cursor (to select items with)
  SetCursorMode (MODE_USE);
  // But, override the appearance to look like the arrow
  SetMouseCursor (6);
*/
}


  >:( ??? >:( ???

Ashen

#1
When I get that, it usually means I've missed a brace out somewhere. What's  on the lines before show_inventory_window?

By default, I think it's rep_ex. Have you added/removed anything there that might've caused this?
I know what you're thinking ... Don't think that.

mport2004

rep.ex?


and no i never even clicked on that part of the script and the error message said that it was on line
108:function show_inventory_window () {
and i have a end brace.

Ashen

rep_ex = repeatedly execute.

The 'nested functions not supported' error occurs when you have one function declared inside another. Usually (for me, at least) this is caused by a missing end brace. Since it's the second function declaration (in this case function show_inventory_window () {) that the engine sees as the problem, that's where it sayss the error is. However, since the problem is really likely to be that the function before that hasn't been closed properly, that's where you really need to look. Post the code for the function before line 108.
I know what you're thinking ... Don't think that.

mport2004

i fixed it i dont know what i did but i fixed it??

SMF spam blocked by CleanTalk