Skip to content

Commit

Permalink
Merge pull request #178 from degensean/main
Browse files Browse the repository at this point in the history
Improve the doc
  • Loading branch information
PSkinnerTech committed Apr 30, 2024
2 parents 8de807b + f7eb1ce commit d8f0bb7
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/references/editor-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Install the [sumneko.lua](https://marketplace.visualstudio.com/items?itemName=su
> Lua: Open Addon Manager
```

4. In the Addon Manager, search for "ao", it should be the first result. Click "Enable" and enjoy autcomplete!
1. Open a workspace first. In the Addon Manager, search for "ao", it should be the first result. Click "Enable" and enjoy autcomplete!

If you don't want to do this process for each of your workspaces, you can copy the `Lua.workspace.library` object from the generated workspace `settings.json` file to your global `settings.json` file.

Expand Down
2 changes: 1 addition & 1 deletion src/tutorials/begin/chatroom.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Let's begin by setting up the foundation for our chatroom.

## Step 1: The Foundation

- Open your preferred code editor.
- Open your preferred code editor, e.g. VS Code.

::: info
You may find it helpful to have the [Recommended Extensions](../../references/editor-setup.md) installed in your code editor to enhance your Lua scripting experience.
Expand Down
25 changes: 19 additions & 6 deletions src/tutorials/begin/tokengating.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,14 @@ First, we'll test it from the original aos process.

```lua
Send({ Target = ao.id , Action = "Broadcast", Data = "Hello" })
-- Expected Results:
```

Expected Results:

```
message added to outbox
Broadcasting message from Neo. Content: Hello.
New Message From [Your Process ID]: Action = Broadcasted
Broadcasting message from [Your Process ID]. Content: Hello.
```

## Testing from another Process ID.
Expand All @@ -88,17 +93,25 @@ We'll first need to register to the chatroom.

```lua
.load chatroom.lua
Send({ Target = [Your Process ID], Action = "Register" })
-- Expected Results:
Send({ Target = ao.id, Action = "Register" })
```

Expected Results:

```
message added to outbox
New Message From [Your Process ID]: Data = registered
```

Now, let's try to send a message to the chatroom.

```lua
Send({ Target = [Your Process ID] , Action = "Broadcast", Data = "Hello?" })
-- Expected Results:
Send({ Target = ao.id , Action = "Broadcast", Data = "Hello?" })
```

Expected Results:

```
message added to outbox
UNAUTH REQ: [New Process ID]
```
Expand Down

0 comments on commit d8f0bb7

Please sign in to comment.