Forum > General

Using Lua 5.4 with Free Pascal

(1/1)

imekon:
Put together a sample of Lua integration with Free Pascal here:

https://github.com/imekon/luatest2

It's based on Lua54 for Pascal here: https://github.com/malcome/Lua4Lazarus

Currently released 32 bit versions but tried 64 bit with Lazarus just fine.

I'm using Lua with Raylib to put together a simple dungeon game, Lua is supplying the configuration script on startup.  :)

axel18:
why don t you  use raylib with pascal lazarius, you have a good binding with it ?
 

imekon:
I'm using raylib with lazarus, but lua without lazarus

Roland57:
@imekon

Interesting. Thank you for sharing.

Here (Linux Mageia), I had to make the following change in lua54.pas.


--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---{   LUA_LIB_NAME = 'liblua54.so';}   LUA_LIB_NAME = 'liblua-5.4.so';

Weiss:
Pete (Pete?)

thank you for sharing. I am currently playing with Lazarus-Lua53, literally tried for the first time today. Thus, I have no knowledge about Lua whatsoever. Big question: how do I pass values from main application to embedded Lua interpreter? I am currently talking to Lua through text input in memo (TMemo). I am sure this must be something trivial, also sure I will eventually find it on my own, but quick pointers will be highly appreciated.

Navigation

[0] Message Index

Go to full version