From 269abd1ce01542f3143296f10d9fceb94f5cd276 Mon Sep 17 00:00:00 2001 From: softbf395 <130502864+softbf395@users.noreply.github.com> Date: Fri, 11 Oct 2024 06:36:58 -0500 Subject: [PATCH] Create main.luau replacing main.lua --- source/main.luau | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 source/main.luau diff --git a/source/main.luau b/source/main.luau new file mode 100644 index 0000000..0caee03 --- /dev/null +++ b/source/main.luau @@ -0,0 +1,21 @@ +-- source/main.luau + +-- Import the Files module +local Files = require("Files") + +-- Get the app name from the global variable set in C++ +-- The app name is available because we set it in library.cpp +local appName = appName or "Test" -- Fallback if not set + +-- Initialize the Workspace directory +if not Files.initializeWorkspace(appName) then + print("Failed to initialize the Workspace directory.") +end + +-- Define a function to greet a user +function greet(name) + return "Hello, " .. name .. "!" +end + +-- Call the greet function and print the result +print(greet("World")) -- Output: Hello, World!