File: setCustomEncoding.html

package info (click to toggle)
sludge 2.2-1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 6,820 kB
  • sloc: cpp: 31,960; sh: 1,037; xml: 874; makefile: 672
file content (52 lines) | stat: -rwxr-xr-x 2,364 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<TITLE>setCustomEncoding</TITLE>
  <link rel="stylesheet" type="text/css" href="style.css" />
</head>
<BODY>
<HR>
<div align="center"><img id="headerGraphic" src="images/sludge300.png" alt="SLUDGE"/></div>
<h2>setCustomEncoding</h2>
<HR>

<H3>Syntax:</H3>

<P>
<pre class="syntax">setCustomEncoding (<i>n</i>);</pre>
</P>

<H3>Purpose:</H3>

<P>
Changes the way in which files are treated when created by the <a href="loadCustomData_and_saveCustomData.html">saveCustomData</a> function or read by the <a href="loadCustomData_and_saveCustomData.html">loadCustomData</a> function.
</P>

<P>
If the value of n is NULL (or FALSE, or NORMAL, or anything else that equates to 0) then <a href="loadCustomData_and_saveCustomData.html">saveCustomData</a> creates text files. Text files can only contain strings. Should you use <a href="loadCustomData_and_saveCustomData.html">saveCustomData</a> to save a stack which contains anything other than a string, a string representing the value will be stored instead.
</P>

<P>
If the value of n is any number between 1 and 65535 then <a href="loadCustomData_and_saveCustomData.html">saveCustomData</a> will create encoded data files. Encoded data files can contain strings and numbers but no other variable types. Should you try to use <a href="loadCustomData_and_saveCustomData.html">saveCustomData</a> to save a stack which contains anything other than a string or a number the engine will close with a fatal error message. This is because custom data files should be usable by any SLUDGE game and costumes, animations, file handles and so on are all game-specific.
</P>

<P>
If the value of n is less than 0 or greater than 65535 then the behaviour of <a href="loadCustomData_and_saveCustomData.html">saveCustomData</a> and <a href="loadCustomData_and_saveCustomData.html">loadCustomData</a> is not guaranteed. Don't do it. It's just plain dumb.
</P>

<P>
The default custom encoding setting before setCustomEncoding is called is 0.
</P>

<H3>Return value:</H3>

<P>
No return value.
</P>

<P class="copyright-notice">SLUDGE and this SLUDGE documentation are <A HREF="Copyright.html">copyright</A> Hungry Software and contributors 2000-2012
</P>

<HR>
</BODY>
</html>