Difference between revisions of "Msg txt"

From Hercules Wiki
Jump to: navigation, search
(Created page with "==Syntax== char* '''msg_txt'''(int msg_number); ==Parameters== * '''msg_number''' - Message ID of the requested message. ==Description== This function retrieves a pointer t...")
 
(Example)
 
Line 9: Line 9:
  
 
==Example==
 
==Example==
  '''clif->displaymessage'''(sd->fd, msg_txt(3));
+
  '''[[Clif Displaymessage|clif->displaymessage]]'''(sd->fd, msg_txt(3));
 
This would pass pointer to the message "Character not found." to the function [[Clif Displaymessage]].
 
This would pass pointer to the message "Character not found." to the function [[Clif Displaymessage]].
  
 
[[Category:Source Functions]]
 
[[Category:Source Functions]]

Latest revision as of 05:29, 25 September 2013

Contents

Syntax

char* msg_txt(int msg_number);

Parameters

  • msg_number - Message ID of the requested message.

Description

This function retrieves a pointer to a message string, which was loaded from conf/messages.conf. Although the return value is not typed as const, it should be handled as such and the contents pointed to by the pointer should be only read.

Example

clif->displaymessage(sd->fd, msg_txt(3));

This would pass pointer to the message "Character not found." to the function Clif Displaymessage.