34 Topics

Member Avatar for
Member Avatar for Lihui Zhang

For programmers who do not like to use IDEs, it may not be convenient to find specific strings in files of a specified type. Using standard grep is an option, but specifying file types can be quite cumbersome. We can solve this with a small script. First, use find to …

Member Avatar for Lihui Zhang
1
114
Member Avatar for warmexxus

Daniweb was kind enough to send me an email reminding me that my account was still active. So I decided on a random day to come back in and see what's going on?! I haven't programmed anything in over one year and I'm not sure what/if I will make in …

Member Avatar for Dani
0
36
Member Avatar for Jiby_1

using lua is it possible to download from url?? Below code i have tried but not getting 1) using curl local curl = require "luacurl" local c = curl.new() function GET(url) c:setopt(curl.OPT_URL, url) local t = {} -- this will collect resulting chunks c:setopt(curl.OPT_WRITEFUNCTION, function (param, buf) table.insert(t, buf) -- …

0
116
Member Avatar for Jiby_1

In php we all know file_get_contents("https://xxxxx/p.php); is there any similar function like in Lua programming language

0
124
Member Avatar for Jiby_1
Member Avatar for Curious Gorge

Hello again! I want to understand how a particular software product works. Its a game and its completely moddable (uses lua for its game logic) yet most modders such as myself don't really understand how it all fits together. I asked something similar to this question a few months ago. …

Member Avatar for TrustyTony
0
202
Member Avatar for Daneos

Hello, anyone can suggest me a simple lua wrapper with clean code? I want to call from c++ lua functions but I dont really get it.. I only know a little LUA and C++. Example lua function I have: Get the level: function Lv(a) local lv = GetChaAttr( a , …

Member Avatar for AceStryker
0
289
Member Avatar for Curious Gorge

Hello again! I want to know what the best way to approach understanding how an application works is. I have a game that is highly moddable with Lua and I would actually like to do that. The problem is I don't know how to make sense of it all. There …

Member Avatar for L7Sqr
0
208
Member Avatar for Curious Gorge

Hey-ya I'm learning Lua and kind of understanding it but I just don't understand some of the code on [this](http://lua-users.org/wiki/ModulesTutorial) Particularly the code inserted into this post. I would just like someone to comment it and explain what its doing so that I may understand. The page referenced lacks comments …

0
140
Member Avatar for Curious Gorge

I need to know if AV software would interfere with my programming hobby. I'm asking this not because I'm writing some kind of malicious code but because I've noticed strange errors when doing things with my programming. For example I'm interested in modding a game with Lua, but after downloading …

Member Avatar for Curious Gorge
0
149
Member Avatar for nseeley3

Hey! So I am new at programming, Pretty much all of my knowledge is Arduino, Processing, and Lua. I was wondering if anyone had any advice about which direction I should go from here. I would want somthing that is Compatible with Windows, Mac, and Linux (possibly BSD). Thanks in …

0
59
Member Avatar for dakerao

Hi I'm really struggling in finding an answer to my problem How do I read a folder and then I want to find a file inside that folder read with specific extensions like .obj or .bmp and to do things to those files with those extensions here is my attempt …

Member Avatar for gusano79
0
197
Member Avatar for csb4622

I'm not sure if this is the right forum or not, but I have been trying to compile some example code from [I]Game Coding Complete 3rd Ed.[/I]. The project uses LuaPlus for scripting and it also makes use of the Boost Library. Both of these seem to have a namespace …

Member Avatar for packerx
0
195
Member Avatar for kartik14

Hi, Is there any way to "clear" work space in Lua similar to the [ICODE]clear [/ICODE]command in Matlab ? Thanks !!

Member Avatar for kartik14
0
186
Member Avatar for kartik14

Hi, I would like to know the significance of lua methods beginning with an underscore.. for example __init().. Thanks !!

Member Avatar for kartik14
0
381
Member Avatar for Celtrix

I am having trouble running the lua interpreter at the same time im running sdl and am also having trouble with processing events in sdl while lua is embedded basically in some pseudo code this is what it looks like so far [CODE] #include <lua.hpp> #include <SDL/SDL.h> #include "user.hpp" int …

Member Avatar for Celtrix
0
355
Member Avatar for fallopiano

Hey everyone, as the title suggests I'm trying to find a function or some code that'll execute a string of code in Lua. If anyone is familiar with Python, It would be the eval function. ex: [CODE=python] eval("y=1") print(y) >>> 1[/CODE] Essentially, I'd like to do that same thing in …

Member Avatar for 0x69
0
773
Member Avatar for hmortensen

Hi, I'm waiting for a file, and then trying to delete it. This is what I have. [CODE] repeat file, msg = io.open("Done.txt", "r") until file file:close() os.remove("Done.txt") dbg=io.open("DEBUG.txt", "a+") dbg:write(file .. "|" .. msg); dbg:write("\n") dbg:close() [/CODE] It does wait for the file to be created (so I know …

0
50
Member Avatar for LuaMan

My project is at [url]https://sourceforge.net/projects/luamacroez/[/url]. It is a program which creates macro scripts, and can execute them within the program. I want to take it to the next level and take the .mlua files it saves, and turn them into an executable file, complete with it's own internal interpereter. I …

0
87
Member Avatar for python user

Hi, I'm a long time python programmer and just began programming in Lua(I might like it better than python). How might I began to program a text adventure/IF in Lua? Any tips, Pointers? I have a basic knowledge of Lua and have began to read this great e-book called "Programming …

Member Avatar for Isaac Remuant
0
1K
Member Avatar for LuaMan

*sigh* I'm back again. Same program. Different problem. [CODE]private void executeToolStripMenuItem_Click(object sender, EventArgs e) { string aaa = String.Format(richTextBoxEditor.ToString()); /*<-- Guessing that this is redundant */ lua.DoString(aaa); //<-- problem code }[/CODE] When I attempt to execute the Lua code in the textbox, it crashes the program. Wat do?

Member Avatar for LuaMan
0
237
Member Avatar for chrishtones

So I am trying to set up Lua on Visual C++ 2008 and I keep getting this error: [B]error C3861: 'luaL_newstate': identifier not found[/B] Here is an example of my code: [CODE] #include <iostream> extern "C" { #include "lua.h" } using namespace std; int main(int argc, char* argv[]) { lua_State …

Member Avatar for 3ing
0
91
Member Avatar for Daaa

I have looked around and it seems that there are no comprehensive tutorials on integrating LUA into a C++ application. What exact files must i have/include/link etc? Most tutorials don't describe this in any detail and i am left wondering what i need where.

Member Avatar for Daaa
0
203
Member Avatar for Sirovica

Hello everyone, My high school offers courses both in Python and Lua. I have done some research on both of the languages and they both seem to be fairly nice. But, which one do you think would be more practical to learn, I know Python is more popular but is …

Member Avatar for jcao219
0
75
Member Avatar for greeran

hi i am having a problem integrating Lua into C++. I found a discussion about it here but it didn't help me. i have installed lua and i can see it in /usr/include and /usr/lib and /usr/bin i created the same code as the previous descussion [CODE] #include <lua.h> #include …

Member Avatar for StuXYZ
1
1K
Member Avatar for athlon32

I have a function in a Lua script, that will take a file and and will work on it. Part of the work it does is to empty the file completely before working with it. The easiest way I know of doing this is to open the file with [icode]io.open[/icode], …

Member Avatar for gusano79
0
3K
Member Avatar for PatMcC

Hi Everyone I just finished a program in Lua and I am really happy with it. However I committed at least two sins, I used a globals and I created a God object. I work alone and my programs are under 2K lines of code. The program had this "design …

Member Avatar for griswolf
0
110
Member Avatar for nickguletskii

I am trying to use Lua in one of my C++ projects, but I get errors: [QUOTE] **** Build of configuration Debug for project MacroLua **** **** Internal Builder is used for build **** g++ -LD:\Program Files\Lua\5.1\lib -oMacroLua.exe MainLuaTest.o MainLuaTest.o: In function `main': C:/Users/s/MacroLua/MacroLua/Debug/../MainLuaTest.cpp:11: undefined reference to `luaL_newstate' C:/Users/s/MacroLua/MacroLua/Debug/../MainLuaTest.cpp:14: undefined …

Member Avatar for nickguletskii
0
434
Member Avatar for vinians

Hi guys Im vinians and Im from Brazil. I love to program in C and lately Im try to create an interface with LUA script language. I probally will burts you with a lot of questions, but Im using C a lot of time and maybe Iwill help somenone someday. …

Member Avatar for Nikkie80
0
122
Member Avatar for vinians

Hi Im new to this comunity and Im in throuble with C heheh. My problem is that: Im using LUA to create scripting capabilities do my software in C. So, I ve created a file called script.c to suport all script code of my project. See: [B]script.c [/B](some lines) [code] …

Member Avatar for vinians
0
110
Member Avatar for Intrade

How would one do this? I've tried extended searches for this and apparently any time I mention WoW and a socket (in reference to WoW the game and socket as in the socket API for Lua), I get a bunch of crap about socketing items in WoW and not any …

0
72
Member Avatar for jarrax

My problem is this. I am making a script engine using lua 5.1.4 for a game engine. At some point I want my script to be able to create an event for example a InitializeEvent (there are other events) which will be done through calling this method: [code=cpp] int ParticleSubSystem::GetIniEvent(lua_State* …

Member Avatar for Lerner
0
98
Member Avatar for jarrax

My problem is this. I am making a script engine using lua 5.1.4 for a game engine. At some point I want my script to be able to create an event for example a InitializeEvent (there are other events) which will be done through calling this method: [code=cpp] int ParticleSubSystem::GetIniEvent(lua_State* …

0
80
Member Avatar for Phil++

Hey, I'm trying to make a basic engine in Lua that prints out "Hello World" now I have downloaded lua and put the files include files into the same folder. But it won't compile. Is there a linker I need? Please help :( thanks

Member Avatar for Comatose
0
90

The End.