<?xml version='1.0' encoding='UTF-8' standalone='no'?>
<section xmlns="http://docbook.org/ns/docbook" version="5.0" xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="_md_docs_2core_2test" xml:lang="en-US">
<title>test</title>
<indexterm><primary>test</primary></indexterm>
<section xml:id="_md_docs_2core_2test_1autotoc_md163">
<title>autotoc_md163</title>
<para>title: ArmaRAMDb - Test icon: mdi:file-text-outline </para>
</section>
<section xml:id="_md_docs_2core_2test_1autotoc_md164">
<title>excerpt: Test Function.</title></section>
<section xml:id="_md_docs_2core_2test_1autotoc_md165">
<title>ramdb_db_fnc_test</title><section xml:id="_md_docs_2core_2test_1autotoc_md166">
<title>Description</title>
<para>A simple test function for verifying database operations. This function displays the received data in a hint message and logs it to the RPT file. It&apos;s primarily used for testing database retrieval operations and callback functionality.</para>
</section>
<section xml:id="_md_docs_2core_2test_1autotoc_md167">
<title>Syntax</title>
<para><literallayout><computeroutput>[_value]&#32;spawn&#32;ramdb_db_fnc_test
</computeroutput></literallayout></para>
</section>
<section xml:id="_md_docs_2core_2test_1autotoc_md168">
<title>Parameters</title>
<para><informaltable frame="all">
    <tgroup cols="4" align="left" colsep="1" rowsep="1">
      <colspec colname='c1'/>
      <colspec colname='c2'/>
      <colspec colname='c3'/>
      <colspec colname='c4'/>
<thead>
      <row  class='markdownTableHead'>
<entry>
<para>Parameter   </para>
</entry><entry>
<para>Type   </para>
</entry><entry>
<para>Description   </para>
</entry><entry>
<para>Default    </para>
</entry></row>
</thead><tbody>
      <row  class='markdownTableRowOdd'>
<entry>
<para><computeroutput>_value</computeroutput>   </para>
</entry><entry>
<para>Array, String, Number, or Boolean   </para>
</entry><entry>
<para>The value to display and log   </para>
</entry><entry>
<para>[]   </para>
</entry></row>
    </tbody>
    </tgroup>
</informaltable>
</para>
</section>
<section xml:id="_md_docs_2core_2test_1autotoc_md169">
<title>Return Value</title>
<para>The same value that was passed to the function. Also sets the global variable <computeroutput>ramdb_db_test</computeroutput> to this value.</para>
</section>
<section xml:id="_md_docs_2core_2test_1autotoc_md170">
<title>Examples</title><section xml:id="_md_docs_2core_2test_1autotoc_md171">
<title>Test with a simple string:</title>
<para><literallayout><computeroutput>[&quot;Hello&#32;World!&quot;]&#32;spawn&#32;ramdb_db_fnc_test;
</computeroutput></literallayout></para>
</section>
<section xml:id="_md_docs_2core_2test_1autotoc_md172">
<title>Test database retrieval by specifying this as callback function:</title>
<para><literallayout><computeroutput>[&quot;playerStats&quot;,&#32;&quot;ramdb_db_fnc_test&quot;]&#32;call&#32;ramdb_db_fnc_get;
</computeroutput></literallayout></para>
</section>
<section xml:id="_md_docs_2core_2test_1autotoc_md173">
<title>Test from client to server:</title>
<para><literallayout><computeroutput>[&quot;Database&#32;is&#32;working!&quot;]&#32;remoteExec&#32;[&quot;ramdb_db_fnc_test&quot;,&#32;2,&#32;false];
</computeroutput></literallayout></para>
</section>
</section>
<section xml:id="_md_docs_2core_2test_1autotoc_md174">
<title>Notes</title>
<para><itemizedlist>
<listitem>
<para>Displays the received value using <computeroutput>hint</computeroutput></para>
</listitem><listitem>
<para>Logs the same value to the RPT file</para>
</listitem><listitem>
<para>Stores the value in the global variable <computeroutput>ramdb_db_test</computeroutput> for later inspection</para>
</listitem><listitem>
<para>Commonly used as a callback function for database operations</para>
</listitem><listitem>
<para>Useful for debugging and verifying data flow</para>
</listitem><listitem>
<para>Can be called directly or specified as a callback in other functions</para>
</listitem></itemizedlist>
</para>
</section>
<section xml:id="_md_docs_2core_2test_1autotoc_md175">
<title>Related Functions</title>
<para><itemizedlist>
<listitem>
<para><computeroutput>ramdb_db_fnc_get</computeroutput>: Retrieves values from the database</para>
</listitem><listitem>
<para><computeroutput>ramdb_db_fnc_handler</computeroutput>: Routes data to callback functions</para>
</listitem><listitem>
<para><computeroutput>ramdb_db_fnc_scheduler</computeroutput>: Manages the callback system</para>
</listitem></itemizedlist>
</para>
</section>
<section xml:id="_md_docs_2core_2test_1autotoc_md176">
<title>Links</title>
<para><link linkend="_md_docs_2core_2add_task">Add Task</link> | <link linkend="_md_docs_2core_2handler">Handler</link> | <link linkend="_md_docs_2core_2init">Init</link> | <link linkend="_md_docs_2core_2print_addon_name">Print Addon Name</link> | <link linkend="_md_docs_2core_2process_queue">Process Queue</link> | <link linkend="_md_docs_2core_2scheduler">Scheduler</link> | <link linkend="_md_docs_2core_2test">Test</link> </para>
</section>
</section>
</section>
