Skip to content

Commit

Permalink
Create main.luau replacing main.lua
Browse files Browse the repository at this point in the history
  • Loading branch information
softbf395 authored Oct 11, 2024
1 parent 7301373 commit 269abd1
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions source/main.luau
Original file line number Diff line number Diff line change
@@ -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!

0 comments on commit 269abd1

Please sign in to comment.