Difference between revisions of "Manual:DIL Manual/beginedit()"

From DikuMUD Wiki
Jump to navigation Jump to search
(XML import)
 
(XML import)
 
Line 1: Line 1:
 +
<span id="bpbeginedit"></span>
 +
 +
'''Function:'''  <i><!--CODE-->beginedit ( u : unitptr);</i><!--ENDCODE-->
  
 +
<!--TERM-->  '''u'''
 +
<!--DEFINITION-->        the PC unit doing the editing
 +
<!--TERM-->  '''return'''
 +
<!--DEFINITION-->        When done  editing it returns SFB_EDIT and activator is set to PC
  
 +
The 'BEGINEDIT' function sets a PC into editing mode.  while in edit mode
 +
the PC field 'editing is set to true.  Once the PC is done editing a 'SFB_EDIT'
 +
message is sent to the unit editing to continue on with the DIL.
 +
If for some reason the PC needs to break
 +
out of the editor before it is done editing then the Dil needs to call
 +
the 'killedit' function
 +
[[#sect-beginedit|interrupt editing before done]]
 +
 +
'''example:'''
 +
<i><!--CODE-->
 +
---~---~---~---~---~---~---~---~---
 +
 +
dilbegin edextra ();
 +
var
 +
        temp:string;
 +
code
 +
dilend
 +
 +
---~---~---~---~---~---~---~---~---
 +
 +
</i><!--ENDCODE-->
 +
The previous DIL is an example of how you could make a command to set the
 +
general extra which is the characters description when you do 'look player'
 +
 +
 +
---~---~---~---~---~---~---~---~---
 
<span id="bpbeginedit"></span>
 
<span id="bpbeginedit"></span>
  
Line 26: Line 59:
 
         temp:string;
 
         temp:string;
 
  code
 
  code
{
+
dilend
        beginedit (self);
 
        wait(SFB_EDIT,self==activator) ;
 
        temp:=textformat(argument);
 
        addextra (self.extra,"general",temp);
 
        quit;
 
}
 
dilend
 
  
 
  ---~---~---~---~---~---~---~---~---
 
  ---~---~---~---~---~---~---~---~---

Latest revision as of 22:39, 4 December 2025

Function:  beginedit ( u : unitptr);
  u
         the PC unit doing the editing
  return
         When done  editing it returns SFB_EDIT and activator is set to PC
The 'BEGINEDIT' function sets a PC into editing mode.  while in edit mode
the PC field 'editing is set to true.  Once the PC is done editing a 'SFB_EDIT'
message is sent to the unit editing to continue on with the DIL.
If for some reason the PC needs to break
out of the editor before it is done editing then the Dil needs to call
the 'killedit' function
interrupt editing before done
example:

---~---~---~---~---~---~---~---~---
dilbegin edextra ();
var
        temp:string;
code

dilend

---~---~---~---~---~---~---~---~---

The previous DIL is an example of how you could make a command to set the
general extra which is the characters description when you do 'look player'


---~---~---~---~---~---~---~---~---

Function:  beginedit ( u : unitptr);
  u
         the PC unit doing the editing
  return
         When done  editing it returns SFB_EDIT and activator is set to PC
The 'BEGINEDIT' function sets a PC into editing mode.  while in edit mode
the PC field 'editing is set to true.  Once the PC is done editing a 'SFB_EDIT'
message is sent to the unit editing to continue on with the DIL.
If for some reason the PC needs to break
out of the editor before it is done editing then the Dil needs to call
the 'killedit' function
interrupt editing before done
example:

---~---~---~---~---~---~---~---~---
dilbegin edextra ();
var
        temp:string;
code

dilend

---~---~---~---~---~---~---~---~---

The previous DIL is an example of how you could make a command to set the
general extra which is the characters description when you do 'look player'


---~---~---~---~---~---~---~---~---