Page 3 of 5

Re: Möan.lua - A simple messagebox system.

Posted: Sat Jun 30, 2018 9:50 am
by yetneverdone
grump wrote: Sat Jun 30, 2018 9:26 am
yetneverdone wrote: Sat Jun 30, 2018 8:53 am Actually, aftwr checking the repo. It should be

```
local Moan = require("moan")
```

Not

```
require("moan")
```
I checked it too and Moan.lua declares a global Moan table. OP's Moan.speak call should work as is with the current Moan.lua from the repo.

Code: Select all

require('Moan')
Moan.speak('Test', { 'test' })
Oh yeah, it's global.

OP, are you using the latest version?

Re: Möan.lua - A simple messagebox system.

Posted: Sat Jun 30, 2018 9:53 am
by Titanor
alright after changing the require line i now have a different error

Code: Select all

Error

main.lua:10: attempt to index upvalue 'Moan' (a boolean value)


Traceback

main.lua:10: in function 'draw'
[C]: in function 'xpcall'

Re: Möan.lua - A simple messagebox system.

Posted: Sat Jun 30, 2018 9:58 am
by Titanor
yeah i am using the latest version i just downloaded it

Re: Möan.lua - A simple messagebox system.

Posted: Sat Jun 30, 2018 10:00 am
by Titanor
here is the latest code btw

Code: Select all

require("lovesplash/lovesplash")
local Moan = require("Moan")

state = "lovesplash"

function love.draw()
  if state == "lovesplash" then
    lovesplash.draw()
  else if state == "menu" then
    Moan.speak("Title", {"Hello world!", "It's me;--Möan.lua"})
  end
end
end

function love.update(dt)
  if state == "lovesplash" then
    lovesplash.update(dt)
    if lovesplash.done() then
      state = "menu"
    end
  end
end

function love.keypressed()
  if state == "lovesplash" then
    lovesplash.stop()
  else if state == "exit" then
    love.event.quit()
  else
  end
end
end

function love.mousepressed()
  if state == "lovesplash" then
    lovesplash.stop()
  else if state == "exit" then
    love.event.quit()
  else
  end
end
end


Re: Möan.lua - A simple messagebox system.

Posted: Sat Jun 30, 2018 10:02 am
by grump
These errors do not match the current state of that lib. Check again if you didn't do any modifications to it, or whether you're using an older version.

If you can't find the error, post a love file. The code you posted is not the culprit.

And don't triple post, edit your comments to add new info.

Re: Möan.lua - A simple messagebox system.

Posted: Sat Jun 30, 2018 11:09 am
by Titanor
here is the .love file of the project

edit: now has a conf.lua file

Re: Möan.lua - A simple messagebox system.

Posted: Sat Jun 30, 2018 11:13 am
by grump
There is no error.

Re: Möan.lua - A simple messagebox system.

Posted: Sat Jun 30, 2018 11:18 am
by Titanor
well on my computer the message box is not showing up after the splash screen

Re: Möan.lua - A simple messagebox system.

Posted: Sat Jun 30, 2018 11:29 am
by grump
...and you didn't feel like telling us that the errors you made this thread for magically solved themselves and that you have a different problem with it now?

You're not using it correctly, you have to call Moan.draw to see something. And calling Moan.speak in every frame may also not be correct, but I don't know that lib.

Re: Möan.lua - A simple messagebox system.

Posted: Sat Jun 30, 2018 12:04 pm
by Titanor
ok so now i have updated it a bit and it now continually beeps without the message showing up