From: "Peter d" <death_comes_to_all@HOTMAIL.COM> > this is the function that will change min level after the applies you add to > the weapon.. <snip of ok function> > > i only added damroll change to test the function. Smart move. Adding lots of new code in the test phase, especially something as easily copied as that, is asking for trouble. > > case 'd': > case 'D': > oedit_disp_prompt_apply_menu(d); >--> GET_OBJ_LEVEL(OLC_OBJ(d)) = change_level_for_stats(d); > break; > > this is what the main menu option for applies looks like.. This is what the above code does: The user presses 'D'->oedit_disp_prompt_apply_menu() shows the menu and puts the user in the OEDIT_PROMPT_APPLY state->The next line checks if the object has anything set, and adjusts the level accordingly-> Next pulse, the user is in OEDIT_PROMPT_APPLY, and the input is parsed in the corresponding part of oedit_parse. What you need to do, is to move the marked line above to the part where OEDIT_PROMPT_APPLY skips out on a '0': case OEDIT_PROMPT_APPLY: - if ((number = atoi(arg)) == 0) + if ((number = atoi(arg)) == 0) { + GET_OBJ_LEVEL(OLC_OBJ(d)) = change_level_for_stats(d); + /*break skips OEDIT_PROMPT_APPLY*/ break; + } else if (number < 0 || number > MAX_OBJ_AFFECT) { oedit_disp_prompt_apply_menu(d); return; } OLC_VAL(d) = number - 1; OLC_MODE(d) = OEDIT_APPLY; oedit_disp_apply_menu(d); return; Welcor -- +---------------------------------------------------------------+ | FAQ: http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html | | Archives: http://post.queensu.ca/listserv/wwwarch/circle.html | | Newbie List: http://groups.yahoo.com/group/circle-newbies/ | +---------------------------------------------------------------+
This archive was generated by hypermail 2b30 : 06/25/03 PDT