Page 1 of 1

my frist mod

PostPosted: Tue Jan 15, 2013 21:33
by chase programer
here it is http://minetestmodsmore.weebly.com/ ps its my frist mod lol

PostPosted: Tue Jan 15, 2013 21:37
by rarkenin
You don't write a mod in C++. This isn't an NPC mod. This is just some C++ that basically compiles a Lua interpreter. Sorry, but this is not a working mod. It is some oseless code probably copy-pasted, judging by the lost characters. You also included the same LUA file in the textures folder. Why would you make a texture a Lua file?! If anything, all you're doing is generating search traffic for your "website".

Also, as I KEEP asking you, PLEASE capitalize and punctuate your sentences, and title the post properly, such as [npc]NPC mod[0.1]

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
lua_State *lua_open (int initialStackSize);
#include <stdio.h>#include <lua.h> int main(int argc, char* argv[ ]){?? lua_State* luaVM = lua_open(0); ?? if (NULL == luaVM)?? {??????printf("Error Initializing lua\n");??????return -1;?? } ?? return 0;}
extern "C"{?? ?}
#include <stdio.h>extern "C"{ #include <lua.h>} int main(int argc, char* argv[ ]){?? lua_State* luaVM = lua_open(0); ?? if (NULL == luaVM)?? {??????printf("Error Initializing lua\n");??????return -1;?? } ?? return 0;}
void lua_close (lua_State *openState);
#include <stdio.h>extern "C"{ #include <lua.h>} int main(int argc, char* argv[ ]){?? lua_State* luaVM = lua_open(0); ?? if (NULL == luaVM)?? {??????printf("Error Initializing lua\n");??????return -1;?? } ?? // Do stuff with lua code.?????? lua_close( luaVM ); ?? return 0;}
#include <stdio.h>extern "C"{ #include <lua.h>} int main(int argc, char* argv[ ]){?? lua_State* luaVM = lua_open(0); ?? if (NULL == luaVM)?? {??????printf("Error Initializing lua\n");??????return -1;?? } ?? // Do stuff with lua code.?????? char* strLuaInput = "a = 1 + 1;\n"; ?? lua_dostring(luaVM, strLuaInput); ?? lua_close(luaVM);??  ?? return 0;}
#include <stdio.h>extern "C"{ #include <lua.h>}?int main(int argc, char* argv[ ]){?? lua_State* luaVM = lua_open(0); ?? if (NULL == luaVM)?? {??????printf("Error Initializing lua\n");??????return -1;?? } ?? // Do stuff with lua code.?????? char* strLuaInput = "a = 1 + 1;\nprint( a);\n"; ?? lua_dostring(luaVM, strLuaInput); ?? lua_close(luaVM);??  ?? return 0;}
#include <stdio.h>extern "C"{ #include <lua.h> #include <lualib.h>} int main(int argc, char* argv[ ]){?? lua_State* luaVM = lua_open(0); ?? if (NULL == luaVM)?? {??????printf("Error Initializing lua\n");??????return -1;?? } ?? // initialize lua standard library functions??? lua_baselibopen(luaVM);?? lua_iolibopen(luaVM);?? lua_strlibopen(luaVM);?? lua_mathlibopen(luaVM);??? // Do stuff with lua code.?????? char* strLuaInput = "a = 1 + 1;\nprint( a);\n"; ?? lua_dostring(luaVM, strLuaInput); ?? lua_close(luaVM);?? ??? return 0;}
#include <stdio.h>
extern "C"
{
 #include <lua.h>
 #include <lualib.h>
}

PostPosted: Tue Jan 15, 2013 21:40
by chase programer
rarkenin wrote:You don't write a mod in C++. This isn't an NPC mod. This is just some C++ that basically compiles a Lua interpreter. Sorry, but this is not a working mod. It is some oseless code probably copy-pasted, judging by the lost characters. You also included the same LUA file in the textures folder. Why would you make a texture a Lua file?!

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
lua_State *lua_open (int initialStackSize);
#include <stdio.h>#include <lua.h> int main(int argc, char* argv[ ]){?? lua_State* luaVM = lua_open(0); ?? if (NULL == luaVM)?? {??????printf("Error Initializing lua\n");??????return -1;?? } ?? return 0;}
extern "C"{?? ?}
#include <stdio.h>extern "C"{ #include <lua.h>} int main(int argc, char* argv[ ]){?? lua_State* luaVM = lua_open(0); ?? if (NULL == luaVM)?? {??????printf("Error Initializing lua\n");??????return -1;?? } ?? return 0;}
void lua_close (lua_State *openState);
#include <stdio.h>extern "C"{ #include <lua.h>} int main(int argc, char* argv[ ]){?? lua_State* luaVM = lua_open(0); ?? if (NULL == luaVM)?? {??????printf("Error Initializing lua\n");??????return -1;?? } ?? // Do stuff with lua code.?????? lua_close( luaVM ); ?? return 0;}
#include <stdio.h>extern "C"{ #include <lua.h>} int main(int argc, char* argv[ ]){?? lua_State* luaVM = lua_open(0); ?? if (NULL == luaVM)?? {??????printf("Error Initializing lua\n");??????return -1;?? } ?? // Do stuff with lua code.?????? char* strLuaInput = "a = 1 + 1;\n"; ?? lua_dostring(luaVM, strLuaInput); ?? lua_close(luaVM);??  ?? return 0;}
#include <stdio.h>extern "C"{ #include <lua.h>}?int main(int argc, char* argv[ ]){?? lua_State* luaVM = lua_open(0); ?? if (NULL == luaVM)?? {??????printf("Error Initializing lua\n");??????return -1;?? } ?? // Do stuff with lua code.?????? char* strLuaInput = "a = 1 + 1;\nprint( a);\n"; ?? lua_dostring(luaVM, strLuaInput); ?? lua_close(luaVM);??  ?? return 0;}
#include <stdio.h>extern "C"{ #include <lua.h> #include <lualib.h>} int main(int argc, char* argv[ ]){?? lua_State* luaVM = lua_open(0); ?? if (NULL == luaVM)?? {??????printf("Error Initializing lua\n");??????return -1;?? } ?? // initialize lua standard library functions??? lua_baselibopen(luaVM);?? lua_iolibopen(luaVM);?? lua_strlibopen(luaVM);?? lua_mathlibopen(luaVM);??? // Do stuff with lua code.?????? char* strLuaInput = "a = 1 + 1;\nprint( a);\n"; ?? lua_dostring(luaVM, strLuaInput); ?? lua_close(luaVM);?? ??? return 0;}
#include <stdio.h>
extern "C"
{
 #include <lua.h>
 #include <lualib.h>
}




i used this http://www.gamedev.net/page/resources/_/technical/game-programming/an-introduction-to-lua-r1932

PostPosted: Tue Jan 15, 2013 21:44
by rarkenin
chase programer wrote:
rarkenin wrote:You don't write a mod in C++. This isn't an NPC mod. This is just some C++ that basically compiles a Lua interpreter. Sorry, but this is not a working mod. It is some oseless code probably copy-pasted, judging by the lost characters. You also included the same LUA file in the textures folder. Why would you make a texture a Lua file?!

SNIP




i used this http://www.gamedev.net/page/resources/_/technical/game-programming/an-introduction-to-lua-r1932


So you just copy-pasted someone's code, and called it your own? That's plagiarism with some licenses. Anyway, that code ISN'T Lua. It's used TO RUN Lua.

PostPosted: Tue Jan 15, 2013 21:46
by chase programer
OK

PostPosted: Wed Jan 16, 2013 00:17
by Menche
There's an introduction to minetest modding here.

PostPosted: Wed Jan 16, 2013 00:18
by Liandri
chase programer wrote:OK


Definitely you have the most misleading nickname in the entire history of modern computing science.