Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem "no suitable block" #1

Closed
TeaAndJellyfish opened this issue Jan 4, 2015 · 8 comments
Closed

Problem "no suitable block" #1

TeaAndJellyfish opened this issue Jan 4, 2015 · 8 comments

Comments

@TeaAndJellyfish
Copy link

Hi,
I do everything to install the plugin but I have still a problem.
When I play and put a block (lever, button...), I have an error that say "no suitable block put by you", I dont know what to do.

And other thing, for me /usr/local/lib/lua/5.1/ doesn't exist, I have to mkdir lua and 5.1

I have success installed the plugin in the past but I can't do it again.

If you have a solution for me it will be very good :)

Ps : thanks for your work, it's amazing to interact between game and reality ^^

@matemat13
Copy link
Owner

Hi!
It's great knowing, that there is actually someone out there who tried it and liked it :)
Unfortunately it has been quite a long time since I last used this, so I no longer remember all the quirks I encountered and how I dealt with them...
If you get the message, it should mean that the plugin is running, although it probably shouldn't behave like this. I will dig into the code and try to find out what could be wrong.
Do you have any other plugins running? Are you using the pure Lua version or the one with C libs?

@TeaAndJellyfish
Copy link
Author

I'm using the pure Lua version.
And I havent other plugins, it's the base install of mcserver

@matemat13
Copy link
Owner

OK, so you put a lever block and than write to chat "/assignlast 5" (or your pin number) and you get a message "No suitable block was placed by you!"? If that is so, than it is possible, that the MCServer changed the block IDs, which would require rewriting some constants in the code, which are currently hard-coded. The /assignlast command should work with these block types:
69, 75, 76, 77 and 143
by simply placing the block and writing the command. Alternatively you can use item with ID 284 (I believe it should be a golden shovel) to mark a block and than use the assignlast command as usual.

For debug you can use the command "/logio". which writes the already assigned blocks to the server console. If you have any experience in programming, I believe the code is easily readable and understandable, so you can try playing around with it and see if something fixes it :)

I would like to look into this, but right now I am studying for exams, so I don't have the time. If you don't get it working, I can take another look after Thursday.

Anyway firstly, please try marking the block (lever/button/redstone torch) with a golden shovel and see if that works. Secondly, try placing a sign and writing "\TEMP" on it (without the quotes) and see if that does something.

And of course let me know how it goes.

@TeaAndJellyfish
Copy link
Author

Like you, I think it's a problem with block's ID but I don't know how to find it.
And after I easily can change the code.

\TEMP, \RAM, \CPU and golden shovel don't work (it's say "Block remenbered" but when I check /logio all blocks have same X,Y and Z)

@TeaAndJellyfish
Copy link
Author

And good chances for your exam ;)

@matemat13
Copy link
Owner

OK, I have just commited an update (or updated a commit, who knows :)), which should fix this problem. It was caused by some (undocumented! grr...) changes in the MCServer API - I had to experiment a bit to get it right, but now it seems to work OK again. Hope you like it :) I played with it the whole afternoon after my exam :D

If you would like to expand the plugin in any way, fell free to make a merge request, just please make your code readable and somehow in the same fashion as mine :) If you don't know Lua don't worry, I didn't know it before writing this plugin, but it is very easy! You can learn it in one afternoon.

@TeaAndJellyfish
Copy link
Author

It work greatly !
Thanks for changes :)

@matemat13
Copy link
Owner

No problem :) Let me know how you like it! If you feel like making a video of it os something, I would be glad to see it in action!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants