Page 2 of 5

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

Posted: Sun Apr 08, 2018 9:07 pm
by jdoolin
Here's a screenshot of a MenuLayout. Inner and outer padding are customizable.
Dialog-1523221020.png
Dialog-1523221020.png (20.54 KiB) Viewed 18072 times

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

Posted: Mon Apr 09, 2018 10:12 am
by yetneverdone
jdoolin wrote: Sun Apr 08, 2018 9:07 pm Here's a screenshot of a MenuLayout. Inner and outer padding are customizable.
Dialog-1523221020.png
Woah. Thats cool. Cant wait for that lib of yours

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

Posted: Fri Apr 27, 2018 4:02 pm
by Fantos
I noticed that for some reason the first message cannot move the camera

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

Posted: Fri Apr 27, 2018 6:12 pm
by milk
Fantos wrote: Fri Apr 27, 2018 4:02 pm I noticed that for some reason the first message cannot move the camera
Should be fixed now.

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

Posted: Fri May 04, 2018 1:00 pm
by holywyvern
Loving this one, it's pretty usefull for any visual novel or rpg game one may want to make.
(wich is what I plan :P) and I like the RM's windowskin compatibility, wich is always a plus.

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

Posted: Sat Jun 30, 2018 6:21 am
by Titanor
hey guys i am trying to use moan in my project but when it gets to the message box code it crashes can someone help with this
here is the error

Code: Select all

Error

Syntax error: joycon.lua:7: unexpected symbol near '<'



Traceback

[C]: at 0x7fa82417f230
[C]: in function 'require'
main.lua:3: in main chunk
[C]: in function 'require'
[C]: in function 'xpcall'
[C]: in function 'xpcall'
and here is the code

Code: Select all

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

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
anyways thanks if you can help

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

Posted: Sat Jun 30, 2018 7:48 am
by yetneverdone
Titanor wrote: Sat Jun 30, 2018 6:21 am hey guys i am trying to use moan in my project but when it gets to the message box code it crashes can someone help with this
here is the error

Code: Select all

Error

Syntax error: joycon.lua:7: unexpected symbol near '<'



Traceback

[C]: at 0x7fa82417f230
[C]: in function 'require'
main.lua:3: in main chunk
[C]: in function 'require'
[C]: in function 'xpcall'
[C]: in function 'xpcall'
and here is the code

Code: Select all

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

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
anyways thanks if you can help
Learn to read error messages. It says "in joycon", the moan library is not the issue. Check for that < operator

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

Posted: Sat Jun 30, 2018 8:15 am
by Titanor
sorry wrong error log i already deleted the joycon library

Code: Select all

Error

main.lua:10: attempt to call field 'speak' (a nil 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 8:53 am
by yetneverdone
Titanor wrote: Sat Jun 30, 2018 8:15 am sorry wrong error log i already deleted the joycon library

Code: Select all

Error

main.lua:10: attempt to call field 'speak' (a nil value)


Traceback

main.lua:10: in function 'draw'
[C]: in function 'xpcall'
That means that the "speak" function of Moan is nil (not a function or doesn't exist). Try browsing the Moan file and search for the "speak" variable

Actually, aftwr checking the repo. It should be

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

Not

```
require("moan")
```

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

Posted: Sat Jun 30, 2018 9:26 am
by grump
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' })