-
Posts
775 -
Joined
-
Last visited
Content Type
Blogs
Forums
Store
Gallery
Videos
Posts posted by Guppy
-
-
Do we really need to make this many topics for what is essential the same bug?
-
My point was ; not all methods are mapped to lua
-
Because digging through the source is not the same as documentation.
He wants a list of functions (methods really) from the headder files - how is that any different than "digging through the source"
-
Maybe anyone could post a whole list of these functions?
What would be the point? If you have the c++ version you have the header files, if you dont then you cant use them...
-
Is there something like glutReshapeFunc for leadwerks? That is a call back that can be registed to be notified when the user resizes the window.
-
bascially if you try to run a c++ project binary currently it will fail with
"mygame: error while loading shared libraries: libsteam_api.so: cannot open shared object file: No such file or directory"
now you can get around that by specifying LD_PATH=. mygame, but that is quite frankly ugly and inconvenient
So please in Project -> Build options -> Linker settings -> Other linker options put
-Wl,-rpath=\\$$$ORIGIN
( personally I use "-Wl,-rpath=\\$$$ORIGIN/sharedlibs/" to avoid causing clutter in the root dir but that's just me )
edit: swapped "." for \\$$$ORIGIN because as codeape pointed out you don't have to stand in the same directory to execute the file.
-
This disables the usage of external libraries and some packages that might be dangerous.
If you want to publish to the steam-workshop, you have to use this, I think.
For further information see:
This applies to "mini game mode" only right?
-
Just notice that it does not yet work in linux, you can use window->maximize() to get more screen estate
-
Confirmed on Ubuntu LTS
In addtion hitting the "get more games" button in the game player does open a tab in an existing browser but will then lock up the computer unless your very fast to close said tab again.
-
Google for "c++ on key release"
or just use OIS and stop worrying about it
-
Did you disable the sandboxing option in the editor options?
That was the sandbox checkmark I was refering to yes
-
as per:
http://www.leadwerks.com/werkspace/topic/10573-lua-dynamic-libraries-not-enabled/
(I've request the topic moved or merged with this but I've no idea how to do that )
Seems
LUA_USE_LINUX and/or LUA_USE_DLOPEN needs to be defined to enable dynamic library loading.
I've provided a simple library to test with in the original thread.
-
Anyone with linux can download the very exciting plugin here;
https://drive.google.com/file/d/0B7B0hlkpWcYWVmhkOEtaTFJ5bzA/edit?usp=sharing
I put it in a subfolder named "plugin" but you can stick it anywhere - just adjust the path acordingly
require("plugin/libLua-test")
it exposes the functions "sayHi" and addTwo(....);
System:Print(test.sayHi())
System:Print(test.addTwo(1,2,3,4))
_
This
http://lua-users.org/lists/lua-l/2014-05/msg00267.html
Seems to suggest that there is a missing define in the linux build
- 1
-
I get "Lua Error: error loading module 'plugin/libLua-test' from file './plugin/libLua-test.so':|dynamic libraries not enabled; check your Lua installation" When I try to load my own library.
This thread http://www.leadwerks.com/werkspace/topic/10566-require/page__hl__require suggests that turning off sandbox will do the trick - I've tried it both in the LE editor and in c++ neither makes any difference.
Since he made it work I'm thinking this could be the linux version having different lua permissions?
Or is removing the sandbox check mark and doing
Interpreter::sandboxmode=false;
in App::Start() before loading the map not enough to turn off sandbox?
-
This is exactly what it does when an error occurs. The call stack is shown in the Lua debugger.
It this a windows feature? - because on linux it just crashes when for instance calling a function that doesn't exist
-
Steps to reproduce ;
Tools > Options
Under editor Font will say <None>
click and select "DejaVu Sans Mono" 12pt
Click ok
Now re open the Menu
Tools > Options and the entire editor crashes
Other fonts gives different results - "Tlwg Typist" font instance sometimes causes an instant crash and some times you can repeat the above steps 10 times before it crashes.
At first I suspected font with spaces in the names but even one word ones sometimes crashes.
-
but in a brand new project it doesn't happen ... :| time to delete code untill it stops happening I guess
Well this was embarasing - somehow ( and I swear I've not changed it ) the debug build target lost the ".debug" extension so the LE editor was using an old version every time I hit debug.
The crash you ask? well that is aparently how LE handles unkown functions - would have been really nice to get an error tbh.
-
The capital b seems to be a paste error, I added the reset line just before loading the the start map and much as I suspected it made no difference ( being called from a script being run by the Interpreter the Interpreter should be initialized ).
The most annoying bit is there is no indication of why it stops it just exits with "Error: Unkown client disconnected"
-
Disclaimer: It's getting a bit late so maybe I'm missing something obvious
I've been trying to figure out the Interpreter class and how to create custom lua functions, and it's going well quite apart from not being able to identify a register function on the interpreter class - so I cheated a bit there.
static int addTwo(lua_State *L){ int argc=Interpreter::GetStackSize(); // equiv to lua_gettop(Interpreter::L) ? int i,t; for (i = 1; i <= argc; i++){ t=Interpreter::ToNumber(i); std::cout << "[C++]addTwo(" << t << ")=" << (t+2) << std::endl; Interpreter::PushFloat(t+2); } return i-1; }
and in App::Start()
lua_register(Interpreter::L,"addTwo",addTwo);
In the fps player controller i added this
a,b,c=addTwo(1,2,3) System:Print(a) System:Print(B) System:Print(c)
to the pickup code rigth after "mass = pickInfo.entity:GetMass()" to make sure I can trigger it when ever I want.
Now the strange bit is this works perfectly in Code::blocks - but by when I run it in the LE editor it instantly crashed when I try to pick something up.
I've tried toggling sandbox to no avail
-
Ran head long into much the same problem - I wanted to check if a specific key had NOT been set. In this case you would expect GetKeyValue to return nil - however it always returns a string and in the case of unset values it returns an empty string
So
if entity:GetKeyValue("unsetkey") ~= nil then System:Print('this will be printed'); end
Where as
if entity:GetKeyValue("unsetkey") ~= "" then System:Print('this wont be printed'); end
Embarrassingly enough this is actually mentioned in the docs;
-
You would ofcourse do automatic backups of the versioning database...
-
Given that you can set any old value with setKeyValue why not set a property telling your if it's destructible?
:SetKeyValue("canBeMined",true)
That way you can also have blocks that cannot be destroyed ( and comparing a bool almost certainly faster than doing string comparision )
-
Very handy - you could even make a "remove fluff" step to get rid of the non optional stuff your project dont need
-
And note that the editor is only supported on ubuntu LTS
[Lua] dynamic libraries not enabled
in Programming
Posted
Any other ideas?