Is there any way to reset the scoreboard on a hub entry?
|
![]() Jul 17 2012, 8:20 pm (Edited on Jul 22 2012, 1:13 pm)
|
|
Yes, something like this. (I can't create a hub to make sure, I'm not a member)
|
That definitely makes it a lot easier. Just from the looks of it, it should work. Thanks a lot.
|
I take it that it may take a while to reset all of them? Considering there's 33 pages of players (20 per page) that need to reset, is there an estimated time of how long it might take?
|
Oondivinezin wrote:
I take it that it may take a while to reset all of them? Considering there's 33 pages of players (20 per page) that need to reset, is there an estimated time of how long it might take? Shouldn't take that long depending on the connection to the hub and if the hub has a limit of connections or something. Just give it a whirl mob/verb/reset_scores() The above will report every 20 players / a page. [EDIT] NOT Tested and I wrote it on my iPhone I think I missed something:/ oh well you can figure it out :) |
Yeah I think the count++ and if(count >= countmax) needed to be indented once.
Well when I run it, I made it so it gives me a count update every single time it gets a new score, however when used, the verb doesn't report anything back. mob Is what I have now. |
mob Reporting every single time it removes something is going to either stall your game or just lag it.. depending on cpu etc. That len.l may need to be changed to length.l use F1 in Dream Maker. |
Nadrew wrote:
Been a while away from DM, ATHK? Should be l.len :) Thanks! and yea it's been awhile :( |
So it doesn't even output the list's length (l.len). The verb doesn't really show much of anything happening at all.
Set_Scores() However this works perfectly fine, the problem is the fact that I'd have to put each key in that's on the scoreboard individually. 655 BYOND keys to reset is not fun. Update here. Runtime error just popped up, if it helps at all. runtime error: Cannot read "1Light1;1mathew;2landman;2mari...".len proc name: Reset Scores (/mob/TrueOwner/verb/Reset_Scores) usr: Oondivinezin (/mob) src: Oondivinezin (/mob) call stack: Oondivinezin (/mob): Reset Scores() |
That's because GetScores() with an empty argument doesn't return a list, it returns a parameter set.
var/list/L = params2list(world.GetScores()) Give that a crack |
That definitely helped out, now it's relaying information back to me. Much appreciated guys.
|
Nadrew wrote:
That's because GetScores() with an empty argument doesn't return a list, it returns a parameter set. > var/list/L = params2list(world.GetScores()) Give that a crack I should read the guide again lol I lost it :( DM that is. |