Skip to content

Hello World!

redstone edited this page Dec 30, 2023 · 5 revisions

Let's write a simple "Hello, World!" program to start with ScriptedHand.

Here's how to set this up:

  1. Navigate to the directory where ScriptedHand is stored
  2. Create a new folder called "Lua"
  3. Inside that folder, create a new file called helloworld.lua
  4. Open that file in a code editor of your choice

Now, in your code editor, add this:

function main()
    smapiPrint("Hello, World!", "INFO")
end

Save this file, and then run Stardew with your mods.

Finally, type this into the SMAPI console:

run_script helloworld.lua

You should see [ScriptedHand] Hello, World! appear in the console.

Clone this wiki locally