You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 436106d
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: Game.Shared/GarrysMod/LuaGlobalFunctions.cs
+39-32Lines changed: 39 additions & 32 deletions
Original file line number
Diff line number
Diff line change
@@ -727,49 +727,26 @@ static int DisableClipping(ILuaInterface lua) {
727
727
}
728
728
#endif
729
729
730
-
[LuaGlobal]
731
-
staticintRunConsoleCommand(ILuaInterfacelua){
732
-
stringcommand=g_Lua!.CheckString(1);
733
-
if(!LuaConVar.IsValidConsoleName(command)){
734
-
g_Lua.ErrorFromLua($"RunConsoleCommand: Command has invalid characters! ({command})\n\tThe first parameter of this function should contain only the command, the second parameter should contain arguments.");
@@ -783,9 +760,39 @@ static int RunConsoleCommand(ILuaInterface lua) {
783
760
}
784
761
buffer.Append(';');
785
762
786
-
stringresult=buffer.ToString();
763
+
result=buffer.ToString();
787
764
if(result.Length>1023)
788
765
result=result[..1023];
766
+
returntrue;
767
+
}
768
+
769
+
[LuaGlobal]
770
+
staticintRunConsoleCommand(ILuaInterfacelua){
771
+
stringcommand=g_Lua!.CheckString(1);
772
+
if(!LuaConVar.IsValidConsoleName(command)){
773
+
g_Lua.ErrorFromLua($"RunConsoleCommand: Command has invalid characters! ({command})\n\tThe first parameter of this function should contain only the command, the second parameter should contain arguments.");
lua.ErrorFromLua($"RunConsoleCommand: Command has invalid characters! ({command})\n\tThe first parameter of this function should contain only the command, the second parameter should contain arguments.");
0 commit comments