Syntax: #LOOPDB dbrec {commands}

Loops through each key-value pair in the database variable and executes the specified commands. When executing the commands, the variable %key contains the current key and %val contains the current value of the keyword.

LOOPDB Example

#ADDKEY db Name Zugg
#ADDKEY db Race Dwarf
#LOOPDB @db {#SHOW %key "=" %val}
Loops through the database record db and displays the key value pairs. In this example, the result would look like:
Name = Zugg
Race = Dwarf

Add comment

Login or register to post comments