Why on earth would you link an image from Discord, while you can upload files here?
Made a screenshot of the image and have uploaded it here, so this whole thread will still make sense in the future.
Logfile is very clear and says there is an undefined variable in line 174 of file 'LFSLapper.lpr' so you might want to start looking at that particular line to see what is going on.
Thanks for this update and all the work you did for Lapper.
Hopefully someone will take over, so that this wonderful program will keep receiving updates and bugfixes.
Can you show me one (or maybe a few) screenshot(s)?
It should be like this:
3 admins connected, button 1, 2 and 3 are used (starting at the bottom and going up)
Then admin 2 goes away, leaving an open space in the list.
When another admin connects, the programs knows that spot 2 is free and will add the admin there.
In the previous system a counter was raised every time an admin connected and therefor big gaps would be possible and the counter only went back to zero, when the last admin would leave.
With the new code the gaps will be filled once new admins come in.
I have tested that and it worked, but maybe I am not understanding the issue correctly.
- Added GlobalVar $admin_array
- Added code to find free spot in array when admin connects
- Added code to make spot in array free again when admin disconnects
- Added code to dynamically calculate button position for connecting admin
- Renamed GlobalVar $top_bot_adm_not_default to $top_bot_adm_notify_default
- Renamed GlobalVar $top_bot_adm_not to $top_bot_adm_notify
- Removed code to restore default button position when number of admins goes to zero
The position of the buttons gets only reset when no admin is present.
It could be solved by closing all buttons once an admin enters and then draw them again, but I opted against it to prevent buttons popping on and off all the time.
Last couple of days we see an increased number of questions about Lapper that are all coming from Turkish players that haven't been online at all or in ages.
In this case - Last online : Sat 26 Mar 2022, 21:38
Still they are talking about server, have requests and so on.
Something fishy is probably going on here.
It never ends because the code keeps going back and forth between sub "jailspec" and sub "jailspec2"
The code is missing an action that's triggered when the time ran out.
As a side note, why using a GlobalButton while a player is send to jail?
I would expect that only that player should see the button, instead of all players.
If you are only seeing one admin, you haven't read my changelog careful enough.
To see all admins you have to set $style to value 'list'
You also have to make sure that the path to your admin file is correct.
I did realize I made a mistake in my thought process last night, so here is version 1.04
I've never posted any broken code, so if it is broken for real, the only cause could be newer releases of Lapper, as all code posted by me, was working at the time of posting.
I doubt that newer released of Lapper aren't working with the code, as I would probably have heard about it and tried to fix it.
To cut a long story short, I am done with your attitude and since I think it's too big of a step to give you a ban from the forum, I will from now on close every thread you start in the Lapper section.
Enough is enough.
Valve?
That's a completely diffent company that has not got anything to do with LFS.
The LFS server can be reset by the owner (or people that got the right to do so) using the "Hosting" tab on this forum.
You clearly have no idea what a MAC address is.
That's a unique number that cannot be changed in any way.
You are confusing it with an IP address, which can be changed or spoofed.
I get it, the webpage should send a variable to Lapper, but I am not sure if that's possible.
You could try to add this to your PHP-script:
echo "0";
Or 1 if that is the outcome of the check.
But again, I am not sure if it's possible to start with.
If I am in de mood this weekend, I will give it a try and come back on it (no promises though).
In case this isn't fixed, I would start to dump every action into a logfile.
The error is clear as it states that at some point the textfile that you want to edit, is empty.
Now you need to find why it is empty and at what point it is or becomes empty.
Maybe the name (that is made from variables) gets funky and when it then tries to open it, the code 'think' it is empty because it cannot find that particular file.
Things like this causes huge headaches, but once you figured it out and was able to fix it, you will get a boost.
If code doesn't work, but there is no error either, it means the code is written and handled correctly. But if for instance a comparison is written wrongly causing it to never be true, nothing will happen, while the actual code is correctly written and handled.
That's why the capability of being able to debug it properly, is so important and that can go as far as micro details by putting a debug message (with a number to know which one you are seeing (or not)) after every line.
This will tell you what step the code has gone through.
I am always willing to help people (search this forum and you will see that's true) but what I don't like is people coming in here, asking questions all the time and not showing what they did to troubleshoot there issue.
Same with this.
You post a piece of code that Bass-Driver has given you and claim it doesn't work.
Okay, there is no error, but errors only come if the code is faulty and/or when Lapper runs into an issue that isn't properly handled by it.
Since there are no errors, we can rule both of those out.
Next step would be to put in some debug-code in the IF-statement to see what is or isn't executed.
Once you know where in the IF-loop you are (or maybe the outcome is that the IF-loop is never entered, so then you have to see what the last step was before that loop), you can start checking the next step.
Debugging can always be done by adding a Privmsg within the loop or by writing something to the Lapper console.
Maybe you did all of this, but you haven't shared any of it and have not told us the outcome of the debugging.
There always is a response, wether it's an error because of faulty code or the IF-statement being excuted.
What have you tried to debug the issue and what was the outcome of that?
I think Bass-Driver was very clear a few posts ago, to not post every issue you have, without making any efforts your self.
This is not a Lapper Helpdesk you can 'call' for all your needs.