PrepareStore routine

TURBU

PrepareStore routine

 

Sets up a store inventory for the shop system to use.

 

Syntax

 

function prepareStore(merchandise: string): word;

 

Description

 

The PrepareStore function prepares an inventory for the shop system to use in its stores.  The merchandise parameter is a string consisting of several numbers separated by spaces.  Each number is the database ID number of an item to be sold in the shop.  A typical merchandise string would look something like this:

 

5 7 28 13 20 21 12

 

Any number that is not a valid item ID is ignored.  The function returns the ID number of the newly-created shop.  It is the designer's responsibility to keep track of this number.  The ID number might be different each time the game runs, but does not change after it has been initially created.

 

Related topics

Shop routine

This help file was created with the free trial version of HelpScribble.