Skip to content

Commit

Permalink
Merge pull request #497 from warjiang/fix/typo-error
Browse files Browse the repository at this point in the history
fix: return value error for CompileLua example
  • Loading branch information
yuin authored Nov 9, 2024
2 parents 7f73012 + ec73447 commit d1cb61e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -595,7 +595,10 @@ Sharing byte code is safe as it is read only and cannot be altered by lua script
// Example shows how to share the compiled byte code from a lua script between multiple VMs.
func Example() {
codeToShare := CompileLua("mylua.lua")
codeToShare, err := CompileLua("mylua.lua")
if err != nil {
panic(err)
}
a := lua.NewState()
b := lua.NewState()
c := lua.NewState()
Expand Down

0 comments on commit d1cb61e

Please sign in to comment.