Skip to content

Instantly share code, notes, and snippets.

@Freezerburn
Created October 20, 2014 01:09
Show Gist options
  • Save Freezerburn/2bc79571eac1b0701fcc to your computer and use it in GitHub Desktop.
Save Freezerburn/2bc79571eac1b0701fcc to your computer and use it in GitHub Desktop.
template logChan: expr = channels[2][]
template log(msg: string) =
# line 86 is the below line.
logChan.send(Message(kind: MessageLog, msg: msg, newline: false, level: LevelNone))
proc playerThreadFunc(channels: ThreadArg) {.thread.} =
let rooms = initRooms()
var currentRoom = rooms[startRoomName]
var going = true
var printDescription = true
while going:
if printDescription:
printDescription = false
echo(currentRoom.description)
# main.nim(228, 11) Info: instantiation from here
# main.nim(86, 24) Error: named expression expected
# line 228 is the below line.
log("Exits are: ")
# ... and more follows ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment