\chapter{list\+Set}
\hypertarget{md_docs_2list_2list_set}{}\label{md_docs_2list_2list_set}\index{listSet@{listSet}}
\hypertarget{md_docs_2list_2list_set_autotoc_md408}{}\doxysubsection{\texorpdfstring{autotoc\+\_\+md408}{autotoc\+\_\+md408}}\label{md_docs_2list_2list_set_autotoc_md408}
title\+: Arma\+RAMDb -\/ List Set icon\+: mdi\+:file-\/text-\/outline \hypertarget{md_docs_2list_2list_set_autotoc_md409}{}\doxysubsection{\texorpdfstring{excerpt\+: Set an element in a list stored at a key in RAMDb.}{excerpt\+: Set an element in a list stored at a key in RAMDb.}}\label{md_docs_2list_2list_set_autotoc_md409}
\hypertarget{md_docs_2list_2list_set_autotoc_md410}{}\doxysection{\texorpdfstring{ramdb\+\_\+db\+\_\+fnc\+\_\+list\+Set}{ramdb\+\_\+db\+\_\+fnc\+\_\+list\+Set}}\label{md_docs_2list_2list_set_autotoc_md410}
\hypertarget{md_docs_2list_2list_set_autotoc_md411}{}\doxysubsection{\texorpdfstring{Description}{Description}}\label{md_docs_2list_2list_set_autotoc_md411}
Updates or sets the value of a specific element at a given index in a list stored at a specified key in the RAMDb database. This function allows for precise modification of list contents by targeting individual elements without affecting other elements in the list. It is particularly useful for updating record information, modifying configuration data, or correcting entries.\hypertarget{md_docs_2list_2list_set_autotoc_md412}{}\doxysubsection{\texorpdfstring{Syntax}{Syntax}}\label{md_docs_2list_2list_set_autotoc_md412}

\begin{DoxyCode}{0}
\DoxyCodeLine{[\_key,\ \_index,\ \_data]\ call\ ramdb\_db\_fnc\_listSet}

\end{DoxyCode}
\hypertarget{md_docs_2list_2list_set_autotoc_md413}{}\doxysubsection{\texorpdfstring{Parameters}{Parameters}}\label{md_docs_2list_2list_set_autotoc_md413}
\tabulinesep=1mm
\begin{longtabu}spread 0pt [c]{*{4}{|X[-1]}|}
\hline
\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Parameter   }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Type   }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Description   }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Default    }\\\cline{1-4}
\endfirsthead
\hline
\endfoot
\hline
\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Parameter   }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Type   }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Description   }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Default    }\\\cline{1-4}
\endhead
\+\_\+key   &String   &The key identifying the list in which to set an element   &"{}"{}    \\\cline{1-4}
\+\_\+index   &Number   &The zero-\/based index of the element to set in the list   &-\/1    \\\cline{1-4}
\+\_\+data   &Array/\+String/\+Number/\+Boolean   &The value to set at the specified index   &\mbox{[}\mbox{]}   \\\cline{1-4}
\end{longtabu}
\hypertarget{md_docs_2list_2list_set_autotoc_md414}{}\doxysubsection{\texorpdfstring{Return Value}{Return Value}}\label{md_docs_2list_2list_set_autotoc_md414}
None. The operation runs synchronously to update the element immediately.\hypertarget{md_docs_2list_2list_set_autotoc_md415}{}\doxysubsection{\texorpdfstring{Examples}{Examples}}\label{md_docs_2list_2list_set_autotoc_md415}
{\bfseries{Update an event log entry\+:}} 
\begin{DoxyCode}{0}
\DoxyCodeLine{["{}eventLog"{},\ 0,\ ["{}Updated\ event\ information"{}]]\ call\ ramdb\_db\_fnc\_listSet;}

\end{DoxyCode}


{\bfseries{Modify player statistics\+:}} 
\begin{DoxyCode}{0}
\DoxyCodeLine{["{}playerStats"{},\ 3,\ [name\ player,\ score\ player,\ alive\ player]]\ call\ ramdb\_db\_fnc\_listSet;}

\end{DoxyCode}


{\bfseries{Update configuration in multiplayer\+:}} 
\begin{DoxyCode}{0}
\DoxyCodeLine{["{}missionConfig"{},\ 1,\ ["{}difficulty"{},\ "{}veteran"{}]]\ remoteExecCall\ ["{}ramdb\_db\_fnc\_listSet"{},\ 2,\ false];}

\end{DoxyCode}
\hypertarget{md_docs_2list_2list_set_autotoc_md416}{}\doxysubsection{\texorpdfstring{Notes}{Notes}}\label{md_docs_2list_2list_set_autotoc_md416}

\begin{DoxyItemize}
\item This function updates only the element at the specified index. All other elements remain unchanged.
\item The index is zero-\/based, meaning the first element is at index 0, the second at index 1, and so on.
\item If the specified index does not exist in the list, the operation may fail or have no effect.
\item Both the {\ttfamily \+\_\+key} parameter and {\ttfamily \+\_\+data} parameter must be valid (non-\/empty string for key, non-\/nil for data), otherwise the function will exit without performing any action.
\item The function supports various data types, including arrays, strings, numbers, and booleans.
\item The update operation is permanent and will overwrite any previous value at the specified index.
\item All list operations are logged for debugging purposes.
\end{DoxyItemize}\hypertarget{md_docs_2list_2list_set_autotoc_md417}{}\doxysubsection{\texorpdfstring{Related Functions}{Related Functions}}\label{md_docs_2list_2list_set_autotoc_md417}

\begin{DoxyItemize}
\item {\ttfamily ramdb\+\_\+db\+\_\+fnc\+\_\+list\+Add}\+: Adds an element to a list
\item {\ttfamily ramdb\+\_\+db\+\_\+fnc\+\_\+list\+Get}\+: Retrieves a specific element from a list
\item {\ttfamily ramdb\+\_\+db\+\_\+fnc\+\_\+list\+Load}\+: Retrieves a range of elements from a list
\item {\ttfamily ramdb\+\_\+db\+\_\+fnc\+\_\+list\+Remove}\+: Removes a specific element from a list
\item {\ttfamily ramdb\+\_\+db\+\_\+fnc\+\_\+list\+Delete}\+: Deletes an entire list
\item {\ttfamily ramdb\+\_\+db\+\_\+fnc\+\_\+scheduler}\+: Processes the callback from the database extension
\end{DoxyItemize}\hypertarget{md_docs_2list_2list_set_autotoc_md418}{}\doxysubsection{\texorpdfstring{Links}{Links}}\label{md_docs_2list_2list_set_autotoc_md418}
\doxysectlink{md_docs_2list_2list_add}{List Add}{0} \texorpdfstring{$\vert$}{|} \doxysectlink{md_docs_2list_2list_delete}{List Delete}{0} \texorpdfstring{$\vert$}{|} \doxysectlink{md_docs_2list_2list_get}{List Get}{0} \texorpdfstring{$\vert$}{|} \doxysectlink{md_docs_2list_2list_load}{List Load}{0} \texorpdfstring{$\vert$}{|} \doxysectlink{md_docs_2list_2list_remove}{List Remove}{0} \texorpdfstring{$\vert$}{|} \doxysectlink{md_docs_2list_2list_set}{List Set}{0} 