Macro samp_sdk::get_string [] [src]

macro_rules! get_string {
    ($amx:ident, $cell:expr) => { ... };
}

Gets a string from a raw pointer to Cell.

Should used in define_native! and raw functions.

Examples

// native:PushString(const string[]);
fn raw_arguments(&self, amx: &AMX, args: *mut Cell) -> AmxResult<Cell> {
    let string = get_string!(amx, args.offset(1));
    log!("got a string: {}", string);
    Ok(0)
}