# rmp::DialogueValue

> A value of the Yarn language: a number, a string or a bool.

Source: https://omardev29.github.io/rmp-docs/reference/classes/rmp-DialogueValue.html

class `#include <rmp/dialogue.h>` [include/rmp/dialogue.h:59](https://github.com/omardev29/raylib_multiplatform/blob/982bf2a1e307c49776bff84211260703b8de6895/include/rmp/dialogue.h#L59-L98)

class DialogueValue

A value of the Yarn language: a number, a string or a bool.

### `Kind`

enum class Kind : std::uint8_t

enum [include/rmp/dialogue.h:62](https://github.com/omardev29/raylib_multiplatform/blob/982bf2a1e307c49776bff84211260703b8de6895/include/rmp/dialogue.h#L62-L66)

Which of Yarn's three types it holds.

| Value |  | Means |
|---|---|---|
| `NUMBER` |  | A number; Yarn has one kind, a float |
| `STRING` |  | A piece of text |
| `BOOL` |  | True or false |

### `DialogueValue`

DialogueValue(float number)

DialogueValue(int number)

DialogueValue(double number)

DialogueValue(bool value)

DialogueValue(std::string text)

template <std::size_t N> // NOLINTNEXTLINE(google-explicit-con

function [include/rmp/dialogue.h:71](https://github.com/omardev29/raylib_multiplatform/blob/982bf2a1e307c49776bff84211260703b8de6895/include/rmp/dialogue.h#L71)

Each one implicit, so `out = 3;` or `set_variable("$met", true)` reads as Yarn does.

`DialogueValue`: A number

`DialogueValue`: A number, as a float

`DialogueValue`: A number, as a float

`DialogueValue`: A bool

`DialogueValue`: A string

### `kind`

Kind kind() const

function [include/rmp/dialogue.h:88](https://github.com/omardev29/raylib_multiplatform/blob/982bf2a1e307c49776bff84211260703b8de6895/include/rmp/dialogue.h#L88)

Which type it holds

### `as_number`

float as_number() const

function [include/rmp/dialogue.h:89](https://github.com/omardev29/raylib_multiplatform/blob/982bf2a1e307c49776bff84211260703b8de6895/include/rmp/dialogue.h#L89)

A string read as a number; a bool 1 or 0

### `as_bool`

bool as_bool() const

function [include/rmp/dialogue.h:90](https://github.com/omardev29/raylib_multiplatform/blob/982bf2a1e307c49776bff84211260703b8de6895/include/rmp/dialogue.h#L90)

A number not 0; a string "true"

### `as_string`

std::string as_string() const

function [include/rmp/dialogue.h:91](https://github.com/omardev29/raylib_multiplatform/blob/982bf2a1e307c49776bff84211260703b8de6895/include/rmp/dialogue.h#L91)

As a line shows it: 2, 2.5, True
