The following warnings occurred:
Warning [2] Undefined variable $settings - Line: 32 - File: inc/plugins/avatarep.php PHP 8.1.34 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/avatarep.php 32 errorHandler->error_callback
/inc/class_plugins.php 38 require_once
/inc/init.php 235 pluginSystem->load
/global.php 20 require_once
/showthread.php 28 require_once
Warning [2] Trying to access array offset on value of type null - Line: 32 - File: inc/plugins/avatarep.php PHP 8.1.34 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/avatarep.php 32 errorHandler->error_callback
/inc/class_plugins.php 38 require_once
/inc/init.php 235 pluginSystem->load
/global.php 20 require_once
/showthread.php 28 require_once
Warning [2] Undefined array key "action" - Line: 1545 - File: inc/plugins/avatarep.php PHP 8.1.34 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/avatarep.php 1545 errorHandler->error_callback
/inc/class_plugins.php 142 avatarep_popup
/global.php 100 pluginSystem->run_hooks
/showthread.php 28 require_once
Warning [2] Undefined property: MyLanguage::$mention - Line: 524 - File: inc/plugins/MentionMe/forum.php PHP 8.1.34 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/MentionMe/forum.php 524 errorHandler->error_callback
/inc/class_plugins.php 142 mentionMeBuildPopup
/global.php 498 pluginSystem->run_hooks
/showthread.php 28 require_once
Warning [2] Undefined property: MyLanguage::$mention_autocomplete_loading - Line: 5 - File: inc/plugins/MentionMe/forum.php(557) : eval()'d code PHP 8.1.34 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/MentionMe/forum.php(557) : eval()'d code 5 errorHandler->error_callback
/inc/plugins/MentionMe/forum.php 557 eval
/inc/class_plugins.php 142 mentionMeBuildPopup
/global.php 498 pluginSystem->run_hooks
/showthread.php 28 require_once
Warning [2] Undefined variable $unreadreports - Line: 34 - File: global.php(961) : eval()'d code PHP 8.1.34 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/global.php(961) : eval()'d code 34 errorHandler->error_callback
/global.php 961 eval
/showthread.php 28 require_once
Warning [2] Undefined variable $udmata - Line: 1182 - File: inc/plugins/avatarep.php PHP 8.1.34 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/avatarep.php 1182 errorHandler->error_callback
/inc/plugins/avatarep.php 1142 avatarep_format_ugroups
/inc/class_plugins.php 142 avatarep_style_guser
/global.php 1276 pluginSystem->run_hooks
/showthread.php 28 require_once
Warning [2] Trying to access array offset on value of type null - Line: 1182 - File: inc/plugins/avatarep.php PHP 8.1.34 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/avatarep.php 1182 errorHandler->error_callback
/inc/plugins/avatarep.php 1142 avatarep_format_ugroups
/inc/class_plugins.php 142 avatarep_style_guser
/global.php 1276 pluginSystem->run_hooks
/showthread.php 28 require_once
Warning [2] Undefined variable $udmata - Line: 1182 - File: inc/plugins/avatarep.php PHP 8.1.34 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/avatarep.php 1182 errorHandler->error_callback
/inc/plugins/avatarep.php 1142 avatarep_format_ugroups
/inc/class_plugins.php 142 avatarep_style_guser
/global.php 1276 pluginSystem->run_hooks
/showthread.php 28 require_once
Warning [2] Trying to access array offset on value of type null - Line: 1182 - File: inc/plugins/avatarep.php PHP 8.1.34 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/avatarep.php 1182 errorHandler->error_callback
/inc/plugins/avatarep.php 1142 avatarep_format_ugroups
/inc/class_plugins.php 142 avatarep_style_guser
/global.php 1276 pluginSystem->run_hooks
/showthread.php 28 require_once
Warning [2] Undefined array key "button_mention" - Line: 40 - File: inc/functions_post.php(946) : eval()'d code PHP 8.1.34 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/functions_post.php(946) : eval()'d code 40 errorHandler->error_callback
/inc/functions_post.php 946 eval
/showthread.php 1121 build_postbit
Warning [2] Undefined array key "button_mention" - Line: 40 - File: inc/functions_post.php(946) : eval()'d code PHP 8.1.34 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/functions_post.php(946) : eval()'d code 40 errorHandler->error_callback
/inc/functions_post.php 946 eval
/showthread.php 1121 build_postbit
Warning [2] Undefined array key "button_mention" - Line: 40 - File: inc/functions_post.php(946) : eval()'d code PHP 8.1.34 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/functions_post.php(946) : eval()'d code 40 errorHandler->error_callback
/inc/functions_post.php 946 eval
/showthread.php 1121 build_postbit
Warning [2] Undefined array key 1 - Line: 3599 - File: inc/functions.php PHP 8.1.34 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/functions.php 3599 errorHandler->error_callback
/inc/plugins/avatarep.php 583 format_avatar
/inc/plugins/avatarep.php 1079 avatarep_format_avatar
/inc/class_plugins.php 142 avatarep_threads
/showthread.php 1619 pluginSystem->run_hooks
Warning [2] Undefined variable $defaul_avatar - Line: 618 - File: inc/plugins/avatarep.php PHP 8.1.34 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/avatarep.php 618 errorHandler->error_callback
/inc/plugins/avatarep.php 1079 avatarep_format_avatar
/inc/class_plugins.php 142 avatarep_threads
/showthread.php 1619 pluginSystem->run_hooks
Warning [2] Undefined array key "usergroup" - Line: 624 - File: inc/plugins/avatarep.php PHP 8.1.34 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/avatarep.php 624 errorHandler->error_callback
/inc/plugins/avatarep.php 1079 avatarep_format_avatar
/inc/class_plugins.php 142 avatarep_threads
/showthread.php 1619 pluginSystem->run_hooks
Warning [2] Undefined array key "displaygroup" - Line: 625 - File: inc/plugins/avatarep.php PHP 8.1.34 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/avatarep.php 625 errorHandler->error_callback
/inc/plugins/avatarep.php 1079 avatarep_format_avatar
/inc/class_plugins.php 142 avatarep_threads
/showthread.php 1619 pluginSystem->run_hooks
Warning [2] Undefined property: MyLanguage::$avatarep_user_alt_thread_contributor - Line: 1108 - File: inc/plugins/avatarep.php PHP 8.1.34 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/avatarep.php 1108 errorHandler->error_callback
/inc/class_plugins.php 142 avatarep_threads
/showthread.php 1619 pluginSystem->run_hooks
Warning [2] Undefined variable $mentionScript - Line: 27 - File: showthread.php(1621) : eval()'d code PHP 8.1.34 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/showthread.php(1621) : eval()'d code 27 errorHandler->error_callback
/showthread.php 1621 eval
Warning [2] Undefined property: MyLanguage::$thread_modes - Line: 43 - File: showthread.php(1621) : eval()'d code PHP 8.1.34 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/showthread.php(1621) : eval()'d code 43 errorHandler->error_callback
/showthread.php 1621 eval




SilkScarfMinetest
#1
INSTALLING minetestserver via apt



https://www.youtube.com/watch?v=Xxt-5YXM4HI - How to setup Minetest Server with MineClone2 in 5 minutes




^ the install guide we're using for troubleshooting




If you install minetestserver via apt (on debian-based systems), here are the relevant directories:



You must move mineclone2 (or other games) to:



`/usr/share/games/minetest/games/ `

Worlds are stored in:

`~/.minetest/worlds`

minetest.conf in:

`/etc/minetest`



https://cryptpad.fr/sheet/#/2/sheet/edit/-fOoCZgwi22lnmhBqm0DgIFl/ - troubleshooting log



Compiling minetestserver:


Careful which version you use with mineclone2


Option #2:


https://github.com/minetest/minetest#compiling


https://github.com/minetest/minetest/releases/tag/5.6.0


https://github.com/minetest/irrlicht/releases/tag/1.9.0mt7


https://forum.minetest.net/viewtopic.php?t=16407 - mineclone2 version 0.82.0 (for Minetest 5.5.1 / 5.6.0)
Reply
#2
Tools:
https://wiki.minetest.net/Minetestmapper
Reply
#3
We ran into issues running minetest version 5.6.1 and mineclone version 0.82.0 on Oracle's free cloud ARM server.



Minetest/Mineclone troubleshooting:

Two issues with running Minetest on Oracle ARM servers:

1. ARM architecture doesn't like the Lua JIT in the distro. You need to use the statically linked libraries provided with Minetest

https://forum.minetest.net/viewtopic.php?p=420955#p420955

https://forum.minetest.net/viewtopic.php?f=6&t=29119&p=421003#p421003 ← this thread explains the best

^ https://github.com/minetest/minetest/issues/12864

^^ https://github.com/minetest/minetest/issues/12850#issuecomment-1276255538

2. Curiosity values in the latest mineclone2 release 0.82.0 were bugged, and llamas and wither skeletons spawning would crash the game, because their curiosity values would cause issues with random number generation in Lua.

https://git.minetest.land/MineClone2/MineClone2/issues/3357

https://stackoverflow.com/questions/59493432/bad-argument-to-random

https://git.minetest.land/MineClone2/MineClone2/issues/3357

https://git.minetest.land/MineClone2/MineClone2/issues/3400

This issue should be fixed in the next mineclone2 release - https://git.minetest.land/MineClone2/MineClone2/issues/3400#issuecomment-62216



Fixing the 1st issues led to the second issue. This is because the default luajit (used for AMD64 architecture) rounds up to 1 and regular lua (which we were forced to use for Oracle's ARM architecture)rounds down to 0. Rounding down to 0 on integer division causes issues.





=========================

SOLUTIONS

=========================



1. ARM architecture doesn't like the system's LuaJIT libraries, which Minetest's build file defaults to.

Solution: configure CMake to use the included Lua library instead of the system's LuaJIT library

- Reference documentation here https://github.com/minetest/minetest#compiling. It will inform you that if you don't use the LuaJIT 2.0+ dependency, "Bundled Lua 5.1 is used" instead

- When running the cmake command, run this command instead:

`cmake . -DRUN_IN_PLACE=TRUE -DBUILD_CLIENT=TRUE -DBUILD_SERVER=TRUE -DENABLE_LUAJIT=OFF`

`make -j$(nproc)`

- After the server executable is made, run `./bin/minetestserver` and play the game to pressure test it

- Done



2. Curiosity values in the latest mineclone 2 release were bugged, and llamas and wither skeletons spawning would crash the game

Solution: add a check to make sure the entities' (llama and wither skeleton) curiosity values are > 20, to avoid this issue. NOTE: this will disable head-tracking for llamas and wither skeletons (meaning they won't look at the player anymore) We decided this is an acceptable trade-off to stop the constant crashing.

- In your mineclone2 folder, navigate here: `mineclone2/mods/ENTITIES/mcl_mobs`

- Open `effects.lua`

- Go to `local function who_are_you_looking_at (self)`, or search for "curiosity""

- Examine this line:

```

Code:
if math.random(1, 30) then
--minetest.log("Change look check: ".. self.name)
local look_at_player_chance = math.random(20/self.curiosity)
-- was 5000 but called in loop based on entities. so div by 12 as estimate avg of entities found,
-- then div by 20 as less freq lookup



```

This causes an issue because `math.random(20/self.curiosity)` evaluates to `math.random(0.3333)` when curiosity is 60, and is rounded to `math.random(0)`. From the stack overflow link, `math.random(0)` is equivalent to `math.random(1,0)`, which tries to pick a random number in an interval starting with 1, and ending with 0. But the 1st argument must be smaller than the 2nd argument for math.random to work, so it does not work, and throws a 'there is no interval' error.

Modify the code so that it looks like this:

```


Code:
if math.random(1, 30) then
            --minetest.log("Change look check: ".. self.name)
            local look_at_player_chance = 0
            if self.curiosity < 20 then
local look_at_player_chance = math.random(20/self.curiosity)
            end
-- was 5000 but called in loop based on entities. so div by 12 as estimate avg of entities found,
-- then div by 20 as less freq lookup



```

This defaults `look_at_player_chance = 0`, which means that the mobs don't look at the player by default. And then if curiosity is < 20 (meaning it won't cause an error with `math.random`), then you can calculate the chance of looking at players like usual. This means that all mobs with curiosity > 60 (llama, wither skeleton), will never look at the player.

- Run `./bin/minetestserver` and play the game to pressure test it

- Done
Reply


Forum Jump:


Users browsing this thread: