help for mod![solved]

User avatar
azekill_DIABLO
Member
 
Posts: 3458
Joined: Wed Oct 29, 2014 20:05
GitHub: azekillDIABLO
In-game: azekill_DIABLO

help for mod![solved]

by azekill_DIABLO » Mon Apr 11, 2016 10:27

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
snapper:register_mob("snapper:snapper", {
   type = "monster",
   passive = false,
   attack_type = "dogfight",
   reach = 2,
   damage = 500,
   hp_min = 30,
   hp_max = 30,
   armor = 100,
   collisionbox = {-0.4, -0.4, -0.4, 0.4, 0.4, 0.4},
   visual = "mesh",
   mesh = "snap.obj",
   textures = {
      {"snap.png"},
   },
   blood_texture = "default_mese_crystal.png",
   makes_footstep_sound = true,
   sounds = {
      random = "snap",
   },
   view_range = 25,
   walk_velocity = 3,
   run_velocity = 3,
   jump = true,
   drops = {
      {name = "default:mese_block",
      chance = 1, min = 5, max = 5},
   },
   water_damage = 0,
   lava_damage = 5,
   light_damage = 0,
   fear_height = 0,
})


when i start the game it says:
Image

what is the problem?
Attachments
bug.png
bug.png (139.44 KiB) Viewed 1280 times
Last edited by azekill_DIABLO on Fri Apr 15, 2016 10:51, edited 1 time in total.
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
Hi, my username is azekill_DIABLO and i'm an exelent bug-maker(yeah...i know...i have a bad reputation)

azekill_DIABLO said: Mineyoshi+ABJ+Baggins= TOPIC HIJACKED.
My Mods and Stuff | Voxellar | VoxBox on GITHUB | M.I.L.A Monster engine
WEIRD MODDING CONTEST !!!
 

Dragonop
Member
 
Posts: 1178
Joined: Tue Oct 23, 2012 12:59
GitHub: Dragonop
IRC: Dragonop
In-game: Dragonop

Re: help for mod!

by Dragonop » Mon Apr 11, 2016 14:55

You are using mobs_redo, right? Replace "snapper:register_mob" with "mobs:register_mob". Also check if it has mobs_redo added to depends.txt
 

User avatar
azekill_DIABLO
Member
 
Posts: 3458
Joined: Wed Oct 29, 2014 20:05
GitHub: azekillDIABLO
In-game: azekill_DIABLO

Re: help for mod!

by azekill_DIABLO » Mon Apr 11, 2016 16:48

i'm not using mobs redo, i'm in a folder i called snappers
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
Hi, my username is azekill_DIABLO and i'm an exelent bug-maker(yeah...i know...i have a bad reputation)

azekill_DIABLO said: Mineyoshi+ABJ+Baggins= TOPIC HIJACKED.
My Mods and Stuff | Voxellar | VoxBox on GITHUB | M.I.L.A Monster engine
WEIRD MODDING CONTEST !!!
 

Dragonop
Member
 
Posts: 1178
Joined: Tue Oct 23, 2012 12:59
GitHub: Dragonop
IRC: Dragonop
In-game: Dragonop

Re: help for mod!

by Dragonop » Mon Apr 11, 2016 19:22

Then from where are you getting that function (snapper:register_mob) ?
 

User avatar
azekill_DIABLO
Member
 
Posts: 3458
Joined: Wed Oct 29, 2014 20:05
GitHub: azekillDIABLO
In-game: azekill_DIABLO

Re: help for mod!

by azekill_DIABLO » Tue Apr 12, 2016 09:45

me = noob!
i don't really know wat it is
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
Hi, my username is azekill_DIABLO and i'm an exelent bug-maker(yeah...i know...i have a bad reputation)

azekill_DIABLO said: Mineyoshi+ABJ+Baggins= TOPIC HIJACKED.
My Mods and Stuff | Voxellar | VoxBox on GITHUB | M.I.L.A Monster engine
WEIRD MODDING CONTEST !!!
 

User avatar
oleastre
Member
 
Posts: 81
Joined: Wed Aug 13, 2014 21:39
GitHub: oleastre
In-game: oleastre

Re: help for mod!

by oleastre » Tue Apr 12, 2016 14:25

Only predefined minetest functions are available to all mods.
The list and documentation is here :
https://github.com/minetest/minetest/bl ... ua_api.txt

The register_mob is a specific function defined by the mobs redo mod (and maybe other mobs mod).
So, to use it, you need to depend on that mod.
 

User avatar
azekill_DIABLO
Member
 
Posts: 3458
Joined: Wed Oct 29, 2014 20:05
GitHub: azekillDIABLO
In-game: azekill_DIABLO

Re: help for mod!

by azekill_DIABLO » Wed Apr 13, 2016 09:12

i changed something but it won't work:
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
function snappers:register_entity("snappers:snapper",{
   type = "monster",
   passive = false,
   attack_type = "dogfight",
   reach = 2,
   damage = 500,
   hp_min = 30,
   hp_max = 30,
   armor = 100,
   collisionbox = {-0.4, -0.4, -0.4, 0.4, 0.4, 0.4},
   visual = "mesh",
   mesh = "snap.obj",
   textures = {
      {"snap.png"},
   },
   blood_texture = "default_mese_crystal.png",
   makes_footstep_sound = true,
   sounds = {
      random = "snap",
   },
   view_range = 25,
   walk_velocity = 3,
   run_velocity = 3,
   jump = true,
   drops = {
      {name = "default:mese_block",
      chance = 1, min = 5, max = 5},
   },
   water_damage = 0,
   lava_damage = 5,
   light_damage = 0,
   fear_height = 0,
})

mobs:register_spawn("snappers:snapper", {"default:dirt_with_grass"}, 7, 0, 7000, 1, 31000)

mobs:register_egg("snappers:snapper", "The Big Snap", "default_mese_crystal.png", 1)


It says:
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
2016-04-13 11:20:42: ERROR[main]: ========== ERROR FROM LUA ===========
2016-04-13 11:20:42: ERROR[main]: Failed to load and run script from
2016-04-13 11:20:42: ERROR[main]: C:\Games\Minetest\bin\..\mods\snappers\init.lua:
2016-04-13 11:20:42: ERROR[main]: C:\Games\Minetest\bin\..\mods\snappers\init.lua:1: <name> or '...' expected near '"snappers:snapper"'
2016-04-13 11:20:42: ERROR[main]: ======= END OF ERROR FROM LUA ========
2016-04-13 11:20:42: ERROR[main]: Server: Failed to load and run C:\Games\Minetest\bin\..\mods\snappers\init.lua
2016-04-13 11:20:42: ERROR[main]: ModError: ModError: Failed to load and run C:\Games\Minetest\bin\..\mods\snappers\init.lua
2016-04-13 11:20:42: ERROR[main]: Error from Lua:
2016-04-13 11:20:42: ERROR[main]: C:\Games\Minetest\bin\..\mods\snappers\init.lua:1: <name> or '...' expected near '"snappers:snapper"'
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
Hi, my username is azekill_DIABLO and i'm an exelent bug-maker(yeah...i know...i have a bad reputation)

azekill_DIABLO said: Mineyoshi+ABJ+Baggins= TOPIC HIJACKED.
My Mods and Stuff | Voxellar | VoxBox on GITHUB | M.I.L.A Monster engine
WEIRD MODDING CONTEST !!!
 

Dragonop
Member
 
Posts: 1178
Joined: Tue Oct 23, 2012 12:59
GitHub: Dragonop
IRC: Dragonop
In-game: Dragonop

Re: help for mod!

by Dragonop » Wed Apr 13, 2016 10:48

That funcion doesn't exists, where did you got it from?
Probably from mobs_redo. Mobs_redo is an API, that provides an easy way to add mobs to the game. Btw the code you added last is wrong, use the old one instead. Add depends.txt to your mod folder, then write "mobs" in it, save and close. Then download the "mobs" mod (mobs_redo), and enable it when starting a world with your mod.
When done, use this 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
mobs:register_mob("snapper:snapper", {
       type = "monster",
       passive = false,
       attack_type = "dogfight",
       reach = 2,
       damage = 500,
       hp_min = 30,
       hp_max = 30,
       armor = 100,
       collisionbox = {-0.4, -0.4, -0.4, 0.4, 0.4, 0.4},
       visual = "mesh",
       mesh = "snap.obj",
       textures = {
          {"snap.png"},
       },
       blood_texture = "default_mese_crystal.png",
       makes_footstep_sound = true,
       sounds = {
          random = "snap",
       },
       view_range = 25,
       walk_velocity = 3,
       run_velocity = 3,
       jump = true,
       drops = {
          {name = "default:mese_block",
          chance = 1, min = 5, max = 5},
       },
       water_damage = 0,
       lava_damage = 5,
       light_damage = 0,
       fear_height = 0,
    })

"mobs:register_mob" is a mobs_redo specific function, that you can't use if you don't depend on that mod.
 

User avatar
azekill_DIABLO
Member
 
Posts: 3458
Joined: Wed Oct 29, 2014 20:05
GitHub: azekillDIABLO
In-game: azekill_DIABLO

Re: help for mod!

by azekill_DIABLO » Thu Apr 14, 2016 08:59

ok thanks :)
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
Hi, my username is azekill_DIABLO and i'm an exelent bug-maker(yeah...i know...i have a bad reputation)

azekill_DIABLO said: Mineyoshi+ABJ+Baggins= TOPIC HIJACKED.
My Mods and Stuff | Voxellar | VoxBox on GITHUB | M.I.L.A Monster engine
WEIRD MODDING CONTEST !!!
 

User avatar
azekill_DIABLO
Member
 
Posts: 3458
Joined: Wed Oct 29, 2014 20:05
GitHub: azekillDIABLO
In-game: azekill_DIABLO

Re: help for mod!

by azekill_DIABLO » Thu Apr 14, 2016 10:47

i've done everything you said it always says:

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
2016-04-14 12:40:56: ERROR[main]: mod "snappers" has unsatisfied dependencies:  "mobs"


but i have put the mod"MOBS_redo" in the same folder!(and i renamed it to mobs)
why it won't work??!
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
Hi, my username is azekill_DIABLO and i'm an exelent bug-maker(yeah...i know...i have a bad reputation)

azekill_DIABLO said: Mineyoshi+ABJ+Baggins= TOPIC HIJACKED.
My Mods and Stuff | Voxellar | VoxBox on GITHUB | M.I.L.A Monster engine
WEIRD MODDING CONTEST !!!
 

User avatar
Krock
Member
 
Posts: 3598
Joined: Thu Oct 03, 2013 07:48
GitHub: SmallJoker

Re: help for mod!

by Krock » Thu Apr 14, 2016 20:20

azekill_DIABLO wrote:why it won't work??!

I'm not sure if the mobs redo is 1:1 compatible with the needed mobs mod.

Check your directory structure again, it must look like this:
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
minetest
    └── mods
         ├── snapper
               ├── init.lua
               ├── depends.txt
               └── <further files/directories>
         ├── mobs
               ├── init.lua
               ├── depends.txt
               └── <further files/directories>
         └── <any other mod..>
Newest Win32 builds - Find a mod - All my mods
ALL YOUR DONATION ARE BELONG TO PARAMAT (Please support him and Minetest)
New DuckDuckGo !bang: !mtmod <keyword here>
 

Dragonop
Member
 
Posts: 1178
Joined: Tue Oct 23, 2012 12:59
GitHub: Dragonop
IRC: Dragonop
In-game: Dragonop

Re: help for mod!

by Dragonop » Thu Apr 14, 2016 23:39

azekill_DIABLO wrote:but i have put the mod"MOBS_redo" in the same folder!(and i renamed it to mobs)
why it won't work??!

Not in the same folder... in the mods folder.
 

User avatar
azekill_DIABLO
Member
 
Posts: 3458
Joined: Wed Oct 29, 2014 20:05
GitHub: azekillDIABLO
In-game: azekill_DIABLO

Re: help for mod!

by azekill_DIABLO » Fri Apr 15, 2016 10:37

it's wat i've done but it was off :)


SOLVed
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
Hi, my username is azekill_DIABLO and i'm an exelent bug-maker(yeah...i know...i have a bad reputation)

azekill_DIABLO said: Mineyoshi+ABJ+Baggins= TOPIC HIJACKED.
My Mods and Stuff | Voxellar | VoxBox on GITHUB | M.I.L.A Monster engine
WEIRD MODDING CONTEST !!!
 


Return to Modding Discussion

Who is online

Users browsing this forum: No registered users and 10 guests

cron