var/list/IPsentered=list()
var/list/keysentered=list()
var/contestants=0
mob/proc/Entercontest()
if(src.client.address in IPsentered)
src << "You've already entered another key!"
else
IPsentered+="[src.client.address]"
keysentered+="[src.key]"
src<<"Key recorded."
contestants+=1
src << "You are contestant [contestants]."
src << "Note: You do not need to stay logged in to win."
mob/Admin/verb/Pick_Winner()
var/winner=pick(keysentered)
world << "And the winner is..."
src << sound("drumroll.wav")
sleep(47.7)
world << "[winner]!"
Problem description:
Everytime it picks from the list, it always returns all the keys combined.
I do not see anything wrong in the snippet you provided, is there a save/load system for that list or something similar which may be reverting the list from a list value to a string value?
Also: "src << sound("drumroll.wav")" do you mean that to be world<< ? BTW, try converting that .wav to .ogg if you want to reduce RSC space >_>
- GhostAnime