Monika_Miyazaki wrote:The developers are surely aware of this.
No, there's yet no report of such an issue.
I created an issue https://github.com/minetest/minetest/issues/9091 on GitHub. So that this problem can be solved faster.
PS. Sad to hear that even the developer did not know about this error. Although it has been around for 1 year already (maybe more). I can and will be wrong, but I've seen this mistake in some other CSM mods.
Monika_Miyazaki wrote:The developers are surely aware of this.
No, there's yet no report of such an issue.
I created an issue https://github.com/minetest/minetest/issues/9091 on GitHub. So that this problem can be solved faster.
PS. Sad to hear that even the developer did not know about this error. Although it has been around for 1 year already (maybe more). I can and will be wrong, but I've seen this mistake in some other CSM mods.
Issue was closed. And the mod question isn't settled.
Last edited by Monika_Miyazaki on Sun Jan 19, 2020 21:55, edited 1 time in total.
@Monika_Miyazaki: Remember this is a client side mod. Not a mod. From the error you posted it looks like you put the clientside mod in the mods folder
This topic helps with installing clientside mods: viewtopic.php?f=53&t=17830
The error is due to the CSM not checking if minetest.localplayer is nil. I'm pretty sure they said that in the github issue
Lone_Wolf wrote:@Monika_Miyazaki: Remember this is a client side mod. Not a mod. From the error you posted it looks like you put the clientside mod in the mods folder
This topic helps with installing clientside mods: viewtopic.php?f=53&t=17830
The error is due to the CSM not checking if minetest.localplayer is nil. I'm pretty sure they said that in the github issue
Actually, the mod is set correctly. I know how to install the CSM mod(I'm not an idiot).
And the mods folder is so empty.
minetest.register_globalstep( function( dtime )
-- wait until the player exists
while not player do
player = minetest.localplayer
end
--registering key presses
That removed the error but as soon as I set a marker my screen goes completely gray. I'm assuming the grayness is a different issue.
minetest.register_globalstep( function( dtime )
-- wait until the player exists
while not player do
player = minetest.localplayer
end
--registering key presses
That removed the error but as soon as I set a marker my screen goes completely gray. I'm assuming the grayness is a different issue.
Yeah. Totally gray screen is a mistake, too, but it's a different kind of mistake. An error during the gray screen can be seen in the console where there are explanations.
minetest.register_globalstep( function( dtime )
-- wait until the player exists
while not player do
player = minetest.localplayer
end
--registering key presses
That removed the error but as soon as I set a marker my screen goes completely gray. I'm assuming the grayness is a different issue.
Don't use a while loop. That will freeze the entire client until player exists. Do this instead:
minetest.register_globalstep( function( dtime )
-- wait until the player exists
if not player and not minetest.localplayer then
return
elseif not player then
player = minetest.localplayer
end
--registering key presses
minetest.register_globalstep( function( dtime )
-- wait until the player exists
if not player and not minetest.localplayer then
return
elseif not player then
player = minetest.localplayer
end
--registering key presses
This code does not help to make a mod work normally. And I know where to insert it in the init.lua script.
When the mark is entered via the W+S+LMB command, the grey screen appears. The error is only visible in the console. MT 5.2.0 dev.
The problem is that localplayer does not exist when the mod is loaded so the lines "local player = minetest.localplayer" that are outside of any function will set player to nil. "player" must either be initialized inside of each function that uses it or pass it as a parameter.
@Lone_Wolf - Yeah, the while loop is not the way to go.
edit:
By adding Lone_Wolf's code to every function that uses "player" I have gotten the mod to mostly work, it doesn't seem to save the markers. Most likely modstorage related.
A Pull request was created that corrects all problems with the initialization of the player.
I expect the Pull request to be accepted soon.
PS. GitHub account from which the Pull request from EvolutionPixG was made is not mine, but my friend's.
Last edited by Monika_Miyazaki on Sun Jan 19, 2020 21:31, edited 1 time in total.
Monika_Miyazaki wrote:A Pull request was created that corrects all problems with the initialization of the player.
I expect the Pull request to be accepted soon.
PS. GitHub account from which the Pull request from Evolution Pixels was made is not mine, but my friend's.
Corrected. Done. I don't understand why it wasn't fixed before.
P.S. You need to have already the texture pack installed, because I didn't attached the textures
This fix has already been sent to PR in the GitHub mod repository.
Read the two messages above(in case you just haven't noticed).
I'm still waiting for PR to be accepted into the repository by the author mod.