Multiplayer Interactive-Fiction Game-Design Blog



Download 8.87 Mb.
Page144/151
Date02.02.2017
Size8.87 Mb.
#15199
1   ...   140   141   142   143   144   145   146   147   ...   151

DatabaseObjectDelete


Removes an object from the database.

This deletes the given object from the database.

An object cannot be deleted if it is checked out.

Parameter Name

Description

DatabaseName

Name of the database. This cannot contain any spaces, and must be made up of letters, numbers (except the fist character), and underscores.

Object

Object to be deleted from the database.

Return value description

Returns TRUE if the object was deleted, FALSE if it couldn't be deleted (perhaps because it doesn't exist or is checked out).


DatabaseObjectEnumCheckOut


Returns a list of objects checked out in the database.

Returns a list of objects checked out in the database.



Parameter Name

Description

DatabaseName

Name of the database. This cannot contain any spaces, and must be made up of letters, numbers (except the fist character), and underscores.

Return value description

List of all the objects in the database that are checked out to this VM.


DatabaseObjectGet


Gets the Nth (checked out) object in the datbase.

This gets the Nth (potentially checked-out) object in the database.

It can be used to see what objects are in the database and/or checked out, and if they should be checked out or deleted.

Parameter Name

Description

DatabaseName

Name of the database. This cannot contain any spaces, and must be made up of letters, numbers (except the fist character), and underscores.

Index

Index to get, from 0 to DatabaseObjectNum()-1.

CheckedOut

If TRUE then this gets the Nth checked out item in the database. If FALSE if gets the Nth item (checked out or checked in).

Return value description

Object, or NULL/FALSE if error.


DatabaseObjectNum


Returns the number of objects (checked out) from the database.

Returns the number of objects (potentially checked out) from the database. This function is useful for making the DatabaseObjectGet() call.



Parameter Name

Description

DatabaseName

Name of the database. This cannot contain any spaces, and must be made up of letters, numbers (except the fist character), and underscores.

CheckedOut

If TRUE returns the number of checked out objects. If FALSE returns the number of objects (total) in the database.

Return value description

Returns the number of checked-out objects, or FALSE if error.


DatabaseObjectQueryCheckOut


Checks to see if an object is checked out.

Checks to see if an object is checked out.



Parameter Name

Description

DatabaseName

Name of the database. This cannot contain any spaces, and must be made up of letters, numbers (except the fist character), and underscores.

Object

Object to be to see if it's checked out.

TestOtherVM

If TRUE then this will see if the object is checked out on another VM too (which is slower). If FALSE this only tests for the current VM.

Return value description

2 if the object is checked out to this VM. 1 if it's checked out to another VM (not yet an issue, since a database is only owned by on VM at the moment). 0 if it's not checked out. -1 if the object does not exist in the database.


DatabaseObjectQueryCheckOut2


Checks to see if an object is checked out to any database.

Checks to see if an object is checked out to any database.



Parameter Name

Description

Object

Object to be to see if it's checked out.

TestOtherVM

If TRUE then this will see if the object is checked out on another VM too (which is slower). If FALSE this only tests for the current VM.

Return value description

If the object is checked out, returns the database name as a string. If it isn't then returns a NULL.



Download 8.87 Mb.

Share with your friends:
1   ...   140   141   142   143   144   145   146   147   ...   151




The database is protected by copyright ©ininet.org 2024
send message

    Main page