Skip to content

Commit

Permalink
Make outputMessage::addRawString available in Lua
Browse files Browse the repository at this point in the history
Why write
```lua
msg:addU8(1);
msg:addU8(0);
msg:addU8(113);
```
when you can instead write
```lua
msg:addRawString("\x01\x00\x71");
```
? Would make some lua scripts much easier to write :)
  • Loading branch information
divinity76 authored Sep 13, 2024
1 parent e6861d7 commit b507c90
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/framework/luafunctions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -818,6 +818,7 @@ void Application::registerLuaFunctions()
g_lua.bindClassMemberFunction<OutputMessage>("addU32", &OutputMessage::addU32);
g_lua.bindClassMemberFunction<OutputMessage>("addU64", &OutputMessage::addU64);
g_lua.bindClassMemberFunction<OutputMessage>("addString", &OutputMessage::addString);
g_lua.bindClassMemberFunction<OutputMessage>("addRawString", &OutputMessage::addRawString);

Check failure on line 821 in src/framework/luafunctions.cpp

View workflow job for this annotation

GitHub Actions / ubuntu-g++-Debug-luajit=off

‘addRawString’ is not a member of ‘OutputMessage’

Check failure on line 821 in src/framework/luafunctions.cpp

View workflow job for this annotation

GitHub Actions / ubuntu-g++-Debug-luajit=on

‘addRawString’ is not a member of ‘OutputMessage’

Check failure on line 821 in src/framework/luafunctions.cpp

View workflow job for this annotation

GitHub Actions / ubuntu-g++-Release-luajit=on

‘addRawString’ is not a member of ‘OutputMessage’

Check failure on line 821 in src/framework/luafunctions.cpp

View workflow job for this annotation

GitHub Actions / ubuntu-g++-Release-luajit=off

‘addRawString’ is not a member of ‘OutputMessage’
g_lua.bindClassMemberFunction<OutputMessage>("addPaddingBytes", &OutputMessage::addPaddingBytes);
g_lua.bindClassMemberFunction<OutputMessage>("encryptRsa", &OutputMessage::encryptRsa);
g_lua.bindClassMemberFunction<OutputMessage>("getMessageSize", &OutputMessage::getMessageSize);
Expand Down

0 comments on commit b507c90

Please sign in to comment.