Topywo wrote:*cough* very original, nice.
A sick mod.
Krock wrote:Whoa. That's a great idea.
I hope you can add more diseases :)
davidthecreator wrote:I got some ideas : at these days people are worrying about Ebola you could add that the symptoms are bleeding trough eyes and mouth and after some time it insta kills the infected one . Also you should add cold: well everyone knows the symptoms player should be slower when infected and the last one the z virus should turn people into zombies they should be slower and infect others when touching or punching others also players skin should be changed too look like a zombie
03:42:39: WARNING: Undeclared global variable "xpanes" accessed at ...Kurulan\Minetest\bin\..\mods\pathogen\pathogen/nodes.lua:29
2015-05-30 03:42:39: ERROR[main]: ========== ERROR FROM LUA ===========
2015-05-30 03:42:39: ERROR[main]: Failed to load and run script from
2015-05-30 03:42:39: ERROR[main]: D:\Oyun\Kurulan\Minetest\bin\..\mods\pathogen\pathogen\init.lua:
2015-05-30 03:42:39: ERROR[main]: ...Kurulan\Minetest\bin\..\mods\pathogen\pathogen/nodes.lua:29: attempt to index global 'xpanes' (a nil value)
2015-05-30 03:42:39: ERROR[main]: stack traceback:
2015-05-30 03:42:39: ERROR[main]: ...Kurulan\Minetest\bin\..\mods\pathogen\pathogen/nodes.lua:29: in main chunk
2015-05-30 03:42:39: ERROR[main]: [C]: in function 'dofile'
2015-05-30 03:42:39: ERROR[main]: ...\Kurulan\Minetest\bin\..\mods\pathogen\pathogen\init.lua:12: in main chunk
2015-05-30 03:42:39: ERROR[main]: ======= END OF ERROR FROM LUA ========
2015-05-30 03:42:39: ERROR[main]: Server: Failed to load and run D:\Oyun\Kurulan\Minetest\bin\..\mods\pathogen\pathogen\init.lua
2015-05-30 03:42:39: ERROR[main]: ModError: ModError: Failed to load and run D:\Oyun\Kurulan\Minetest\bin\..\mods\pathogen\pathogen\init.lua
2015-05-30 03:42:39: ERROR[main]: Hata ayrıntıları için debug.txt dosyasını inceleyin.
mahmutelmas06 wrote: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
03:42:39: WARNING: Undeclared global variable "xpanes" accessed at ...Kurulan\Minetest\bin\..\mods\pathogen\pathogen/nodes.lua:29
2015-05-30 03:42:39: ERROR[main]: ========== ERROR FROM LUA ===========
2015-05-30 03:42:39: ERROR[main]: Failed to load and run script from
2015-05-30 03:42:39: ERROR[main]: D:\Oyun\Kurulan\Minetest\bin\..\mods\pathogen\pathogen\init.lua:
2015-05-30 03:42:39: ERROR[main]: ...Kurulan\Minetest\bin\..\mods\pathogen\pathogen/nodes.lua:29: attempt to index global 'xpanes' (a nil value)
2015-05-30 03:42:39: ERROR[main]: stack traceback:
2015-05-30 03:42:39: ERROR[main]: ...Kurulan\Minetest\bin\..\mods\pathogen\pathogen/nodes.lua:29: in main chunk
2015-05-30 03:42:39: ERROR[main]: [C]: in function 'dofile'
2015-05-30 03:42:39: ERROR[main]: ...\Kurulan\Minetest\bin\..\mods\pathogen\pathogen\init.lua:12: in main chunk
2015-05-30 03:42:39: ERROR[main]: ======= END OF ERROR FROM LUA ========
2015-05-30 03:42:39: ERROR[main]: Server: Failed to load and run D:\Oyun\Kurulan\Minetest\bin\..\mods\pathogen\pathogen\init.lua
2015-05-30 03:42:39: ERROR[main]: ModError: ModError: Failed to load and run D:\Oyun\Kurulan\Minetest\bin\..\mods\pathogen\pathogen\init.lua
2015-05-30 03:42:39: ERROR[main]: Hata ayrıntıları için debug.txt dosyasını inceleyin.
local chance_level = math.random(0,10)
print ('chance is '..chance_level)
if chance_level < chance then
print ('should get sick')
pathogen.infect = function(Influencia, player_name)
end
Nathan.S wrote:I can't seem to get sick, I've got this code, which should, I think trigger Influencia.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
local chance_level = math.random(0,10)
print ('chance is '..chance_level)
if chance_level < chance then
print ('should get sick')
pathogen.infect = function(Influencia, player_name)
end
I don't get any errors, and the debug text will print should get sick, so I know the chance mechanics are working, so I can only assume I'm calling the pathogen.infect function incorrectly. The chance variable is defined in a table that has all the foods with the hydration and hunger values.
38. if chance_level < chance then
39. print ('should get sick')
40. local _pathogen = pathogen.get_pathogen( influencia )
41. pathogen.infect = function(_pathogen, singleplayer)
42. end
Nathan.S wrote:Sorry to be as dense as a brick, but I'm hitting a wall.
I have this as my new code: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
38. if chance_level < chance then
39. print ('should get sick')
40. local _pathogen = pathogen.get_pathogen( influencia )
41. pathogen.infect = function(_pathogen, singleplayer)
42. end
I'm getting this error now, which honestly I may have been getting all along, just never noticed it before.
WARNING: Undeclared global variable "influencia" accessed at /home/nathan/.minetest/games/Survive/mods/food/meats.lua:40
Looking at the init.lua file in the pathogen folder in the pathogen mod I do see the table that lists a table called pathogens in the pathogen table, but I don't understand LUA well enough to know if that is a mistake.
local _pathogen = pathogen.get_pathogen("influencia")
Nathan.S wrote:providing the pathogen name as a string does remove the error, but doesn't do anything. I modified the pathogen code to print a message when the pathogen infects the player, and never got the message in the debug, so unfortunately that isn't the solution either.
local influencia = pathogen.get_pathogen("influencia")
pathogen.infect(influencia, "singleplayer")
Users browsing this forum: No registered users and 16 guests