Truxton subject create

From truxwiki.com
Revision as of 09:35, 13 February 2021 by Sam (talk | contribs) (Created page with "This creates an object you can use to record information about an investigative subject in Truxton. =Syntax= <source lang="C"> uint64_t truxton_subject_create( uint64_t truxt...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

This creates an object you can use to record information about an investigative subject in Truxton.

Syntax

uint64_t truxton_subject_create( uint64_t truxton_handle );

Parameters

truxton_handle

The Truxton instance this subject will belong. This handle comes from calling truxton_create().

Return value

A handle to a subject object.

Sample

void create_villan( uint64_t truxton )
{
   uint64_t subject = truxton_subject_create( truxton );

   truxton_subject_set_name( subject, "Khaka Peü Peü" );
   truxton_subject_set_description( subject, "Last name translates to 'This strong hand or that strong hand.'" );
   truxton_subject_set_custom( subject, "Danville PD Tri-State ID: TSA-785543" );
   truxton_subject_set_birthday( subject, to_ticks( "1963-09-18" ) );

   // Commit the data to the database
   truxton_subject_save( subject );
   truxton_subject_destroy( subject );
}