Difference between revisions of "Truxton artifact destroy"
Jump to navigation
Jump to search
(Created page with "This creates an artifact object. Internally, Truxton calls these entities. =Syntax= <syntaxhighlight lang="C"> uint64_t truxton_artifact_destroy(uint64_t artifact_handle); </...") |
(→Sample) |
||
| Line 30: | Line 30: | ||
printf( "Artifact ID is %s\n", id ); | printf( "Artifact ID is %s\n", id ); | ||
| − | truxton_artifact_destroy( | + | truxton_artifact_destroy(artifact); |
truxton_destroy(truxton); | truxton_destroy(truxton); | ||
} | } | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Revision as of 16:26, 16 October 2020
This creates an artifact object. Internally, Truxton calls these entities.
Contents
Syntax
uint64_t truxton_artifact_destroy(uint64_t artifact_handle);
Parameters
artifact_handle
The artifact instance.
This handle comes from calling truxton_artifact_create().
Sample
void create_artifact(void)
{
uint64_t truxton = truxton_create();
uint64_t artifact= truxton_artifact_create(truxton);
truxton_artifact_set_name( artifact, "Ducky Momo Server" );
truxton_artifact_save( artifact);
truxton_artifact_tag( artifact, "Too Young", "Yes, yes I am", 1 );
char id[ 65 ];
truxton_artifact_get_id( artifact, id, sizeof( id ) );
printf( "Artifact ID is %s\n", id );
truxton_artifact_destroy(artifact);
truxton_destroy(truxton);
}