STRING_TO_INT
Parses string as an integer and writes it to outInteger. Returns a boolean describing the outcome of the conversion.
Signature
BOOL STRING_TO_INT(const char* string, int* outInteger); // 0xF2DD2298B3AF23E2 b1207Parameters
| # | Name | Type |
|---|---|---|
| 1 | string | const char* |
| 2 | outInteger | int* (out pointer) |
Facts
| Name | STRING_TO_INT |
|---|---|
| Hash | 0xF2DD2298B3AF23E2 |
| Namespace | |
| Returns | BOOL |
| Game build | 1207 |
Examples
Calls by hash work in every RedM runtime. Replace the placeholder arguments with your own values.
local result, outInteger = Citizen.InvokeNative(0xF2DD2298B3AF23E2, -- STRING_TO_INT
"text", -- const char* string
Citizen.PointerValueInt(), -- int* outInteger
Citizen.ReturnResultAnyway()
)
if result then
-- ...
endconst [result, outInteger] = Citizen.invokeNative("0xF2DD2298B3AF23E2", // STRING_TO_INT
"text", // const char* string
Citizen.pointerValueInt(), // int* outInteger
Citizen.returnResultAnyway()
);
if (result) {
// ...
}var outIntegerArg = new OutputArgument();
bool result = Function.Call<bool>((Hash)0xF2DD2298B3AF23E2, // STRING_TO_INT
"text", // const char* string
outIntegerArg // int* outInteger
);
int outInteger = outIntegerArg.GetResult<int>();Related MISC natives
Facts compiled from community research (alloc8or/rdr3-nativedb-data, femga/rdr3_discoveries); descriptions and examples by The Lab.