[Crossfire-wiki] [Crossfire DokuWiki] page changed: user:gxc:client_side_scripting:cplusplus-howto

no-reply_wiki at metalforge.org no-reply_wiki at metalforge.org
Thu Mar 20 08:13:18 CDT 2008


A page in your DokuWiki was added or changed. Here are the details:

Date        : 2008/03/20 08:13
User        : 
Edit Summary: 

@@ -14,8 +14,9 @@
  	return 0;
  }
  </code>
  This would make the character pray once.
+ 
  ===== 2. Writing to the Screen =====
  To write to the screen, use [[http://www.cplusplus.com/reference/clibrary/cstdio/printf.html|printf]]("[output string]") followed by [[http://www.cplusplus.com/reference/clibrary/cstdio/fflush.html|fflush]](stdout). printf writes the output string in stdout, which is read by the client and interpreted. fflush(stdout) flushes or clears stdout((Normally, stdout doesn't need to be cleared this often, but when scripting for Crossfire, it's good practice to flush it after each use)), readying it for more data.
  
  Example:
@@ -30,8 +31,9 @@
  </code>
  This would return [color=#FF0000]Hello world[/color].
  
  There are several ways to achieve this.
+ 
  ==== 2.1 draw ====
  <code c++>
  printf("draw [number] [string]");
  </code>


IP-Address  : 76.210.47.58
Old Revision: http://wiki.metalforge.net/doku.php/user:gxc:client_side_scripting:cplusplus-howto?rev=1206006112
New Revision: http://wiki.metalforge.net/doku.php/user:gxc:client_side_scripting:cplusplus-howto

-- 
This mail was generated by DokuWiki at
http://wiki.metalforge.net/




More information about the crossfire-wiki mailing list