ID:1775374
 
Keywords: pickproblem
(See the best response by Xirre.)
Code:
mob/proc
BattleStartEasy()
var/Enemies/E = pick(/mob/Enemy in list Easy)

var/list/Easy = new()


Problem description:

My question is how do you let the pick function choose whats in a set list?

loading Game.dme
turf.dm:15:error: Easy: missing comma ',' or right-paren ')'
turf.dm:15:error: Easy: expected end of statement
turf.dm:15:error: ): expected }
turf.dm:15:error: location of top-most unmatched {
Game.dmb - 5 errors, 0 warnings
Best response

var/list/mob/Enemy/EasyEnemies = new/list
for(var/mob/Enemy/e in list Easy)
EasyEnemies += e
pick(EasyEnemies)

It's that easy! :)

I'm not at my computer right now. But, also try pick(/mob/Enemy/ in list Easy). There's one more slash is all