I am setting a room variable as follows:
Code: Select all
tableDeck = list(range(52))
_server.trace("Setting Room Variable " + str(tableDeck))
roomVarList = []
roomVarList.append(RoomVariable("tableDeck", tableDeck, 1,1))
_server.trace(_server.getCurrentRoom().getName())
_server.trace("Room Variables appending!!!")
_server.trace(roomVarList)
_server.setRoomVariables( _server.getCurrentRoom(), None, roomVarList )
Code: Select all
[cards.py]: Setting Room Variable [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51]
[cards.py]: GameRoom1
[cards.py]: Room Variables appending!!!
[cards.py]: [<main.RoomVariable instance 5>]
Traceback (innermost last):
File "<string>", line 834, in init
File "<string>", line 1217, in loadConfig
File "<string>", line 563, in setRoomVariables
File "<string>", line 593, in _prepareRoomVars
UnboundLocalError: local: 't'
18:41:30.906 - [ WARNING ] > Error in extension [ cards.py ]: Traceba
ck (innermost last):
File "<string>", line 834, in init
File "<string>", line 1217, in loadConfig
File "<string>", line 563, in setRoomVariables
File "<string>", line 593, in _prepareRoomVars
UnboundLocalError: local: 't'
--- At line: 41
18:41:30.906 - [ INFO ] > Room [ GameRoom1 ] created!
Can some one point out what possibly could have gone wrong?
Thanks,
Yaswanth