Skip to content

Use mapper to map arbitrary arguments from luaEvent #558

@CrosRoad95

Description

@CrosRoad95

Right now you have to manually read arguments:

        var what = luaEvent.Parameters[0].StringValue!;
        var model = (ObjectModel)luaEvent.Parameters[1].IntegerValue!;
        var error = luaEvent.Parameters[2].StringValue!;

But it would be very handy to use luamapper for such use case

if(luaMapper.TryParse(luaEvent, out string what, out ObjectModel model, out string error))
{
  // Ok
}
else
{
  // Error while parsing
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions