Warning: long value expected

I’m getting this error

Warning: long value expected

My python knowledge is still at its basic, and googling the error too didn’t help

Anybody have any idea what it is, please?

can you post your code which gives you this error?

It’s rather long sorry, the warning didn’t give out any line that caused the error, so I’ve posted them all

[code]# SCENES
#------------------------------------------------------------------------------------------------------------

def setting(val):

#debugPleasewait(0)

resetAll()

me.mod.oscScript.send("status/mode/setting")
me.mod.sceneScript.set( me.mod.sceneScript.SETTING )
op("/project/output/settingMode/timer1").par.start.pulse()

def enterMode(val):

me.mod.sceneScript.set( me.mod.sceneScript.ENTER )
# on enterMode in 
op("/project/output/enterMode/moviefilein6").par.file = "assets/images/enterA/"	#change image path
op("/project/output/enterMode/animation1").par.cuepulse.pulse()	
op("/project/output/enterMode/animation2").par.cuepulse.pulse()

op("/project/output/enterMode/switch1").par.index = 0	# load intro animation


return 0

def login(val):
me.mod.oscScript.send(“status/mode/login”)

def kickoff(val):

resetAll()

me.mod.sceneScript.set( me.mod.sceneScript.GAME )

# ON ENTER MODE OUT
op("/project/output/enterMode/moviefilein6").par.file = "assets/images/enterB/"
op("/project/output/enterMode/reverse1").par.cuepulse.pulse()
op("/project/output/enterMode/reverse2").par.cuepulse.pulse()		
op("/project/output/enterMode/switch1").par.index = 1 # load outro animation

# KICK OFF
op("/project/output/gameMode/container6/timer1").par.start.pulse()
me.mod.oscScript.send("status/mode/kickoff")

#me.mod.timerScript.startTime(0)

def result(val):

# sound
op("/project/output/resultMode/audiofilein1").par.cuepulse.pulse()

# update score
op("/project/output/resultMode/base1/textScore").par.text = me.mod.scoreScript.goalAce
op("/project/output/resultMode/base2/textScore").par.text = me.mod.scoreScript.goalX

# timer
op("/project/output/resultMode/animation1").par.cuepulse.pulse()
op("/project/output/resultMode/animation2").par.cuepulse.pulse()

# start result
me.mod.oscScript.send("status/mode/result")
me.mod.sceneScript.set( me.mod.sceneScript.RESULT )	

DEBUG

#------------------------------------------------------------------------------------------------------------

def debugPleasewait(val):

# RESET SCENE
op("/project/output/plwMode/moviefilein2").par.file = "assets/images/PW/"
op("/project/output/plwMode/timer1").par.start.pulse()
me.mod.sceneScript.set( me.mod.sceneScript.READY )		
resetAll()

def debugNextMatch(val):

op("/project/output/plwMode/moviefilein2").par.file = "assets/images/NM/"
op("/project/output/plwMode/timer1").par.start.pulse()
me.mod.sceneScript.set( me.mod.sceneScript.READY )	
resetAll()

def resetAll():

resetGame()

# CHECK DEBUG MODE
me.mod.config.debugMode = op("/project/interface/container1/container2/debug_td_debugmode/out1")["debug_td_debugmode"]

# TIMER
me.mod.timerScript.stopTime(0)

def resetGame():

# SHOW PLAYER
for i in range(1,11):
	op("/project/interface/container6/debug_td_showPlayer" + str(i)).panel.state.val = 0

# GOAL
me.mod.scoreScript.resetAll()

# BONUS
me.mod.bonusScript.resetAll()

# RESET ANIMATION
me.mod.config.isAnimating = 0

# RESET CHEER/HEART RATE
me.mod.htScript.reset()

# RESET TIMEOUT
me.mod.config.isTimeout = 0

def debutTimeout(val):
me.mod.timerScript.stopTime(0)
me.mod.timerScript.timeOut()

def debugScreen(val):

# for screen calibration + screen color
if int(val) == 0:
	me.mod.sceneScript.set( me.mod.sceneScript.RESOLUTION )	

else:
	me.mod.sceneScript.set( me.mod.sceneScript.COLOR )	

def debugTempo(val):
op(‘/local/time’).par.tempo = math.floor(val * 60 + 60)

DEBUG PLAYER

#------------------------------------------------------------------------------------------------------------

def debugMode(val):
me.mod.config.debugMode = val

LISTS

#------------------------------------------------------------------------------------------------------------

stateOffToOn = {

# MODES
"control/mode/setting": setting,
"control/mode/login": login,
#"control/mode/game": game,
"control/mode/enter": enterMode,
"control/mode/kickoff": kickoff,
"control/mode/result": result,
"control/mode/wait": debugPleasewait,
"control/mode/next": debugNextMatch,

# GOAL
"control/goal/x": me.mod.scoreScript.setGoalX,
"control/goal/ace": me.mod.scoreScript.setGoalAce,
"control/goal/edit/x/plus": me.mod.scoreScript.addGoalX,
"control/goal/edit/x/minus": me.mod.scoreScript.minGoalX,
"control/goal/edit/ace/plus": me.mod.scoreScript.addGoalAce,
"control/goal/edit/ace/minus": me.mod.scoreScript.minGoalAce,
"control/goal/cancel": me.mod.scoreScript.cancel,

# DEBUG GOAL
"control_goal_x": me.mod.scoreScript.setGoalX,
"control_goal_ace": me.mod.scoreScript.setGoalAce,
"control_goal_edit_x_plus": me.mod.scoreScript.addGoalX,
"control_goal_edit_x_minus": me.mod.scoreScript.minGoalX,
"control_goal_edit_ace_plus": me.mod.scoreScript.addGoalAce,
"control_goal_edit_ace_minus": me.mod.scoreScript.minGoalAce,
"control_goal_cancel": me.mod.scoreScript.cancel,

# BONUS
"control/bonus/x": me.mod.bonusScript.setBonusX,
"control/bonus/ace": me.mod.bonusScript.setBonusAce,
"control/bonus/cancel" : me.mod.bonusScript.cancel,
"control/bonus/edit/x/plus": me.mod.bonusScript.addBonusX,
"control/bonus/edit/x/minus": me.mod.bonusScript.minBonusX,
"control/bonus/edit/ace/plus": me.mod.bonusScript.addBonusAce,
"control/bonus/edit/ace/minus": me.mod.bonusScript.minBonusAce,
"control/bonus/cancel": me.mod.bonusScript.cancel,

# DEBUG
"debug_td_pleaseWait": debugPleasewait,
"debug_td_nextMatch": debugNextMatch,
"debug_td_debugmode": debugMode,

# TIMER
"debug_td_startTimer": me.mod.timerScript.startTime,
"debug_td_stopTimer":  me.mod.timerScript.stopTime,
"debug_td_timeOut": debutTimeout,

# DEBUG MODE
"control_mode_setting": setting,
"control_mode_enter": enterMode,
"control_mode_login": login,
#"control_mode_game": game,
"control_mode_kickoff": kickoff,
"control_mode_result": result,

# DEBUG BONUS
"control_bonus_x": me.mod.bonusScript.setBonusX,
"control_bonus_ace": me.mod.bonusScript.setBonusAce,
"control_bonus_cancel": me.mod.bonusScript.cancel,
"control_bonus_edit_x_plus": me.mod.bonusScript.addBonusX,
"control_bonus_edit_x_minus": me.mod.bonusScript.minBonusX,
"control_bonus_edit_ace_plus": me.mod.bonusScript.addBonusAce,
"control_bonus_edit_ace_minus": me.mod.bonusScript.minBonusAce,

# PLAYER
"debug_td_resetPlayer": me.mod.spScript.debugResetPlayer

}

stateValueChange = {

# HEART RATE
"user/10/heartrate": me.mod.htScript.rate10,
"user/9/heartrate": me.mod.htScript.rate9,
"user/8/heartrate": me.mod.htScript.rate8,
"user/7/heartrate": me.mod.htScript.rate7,
"user/6/heartrate": me.mod.htScript.rate6,
"user/5/heartrate": me.mod.htScript.rate5,
"user/4/heartrate": me.mod.htScript.rate4,
"user/3/heartrate": me.mod.htScript.rate3,
"user/2/heartrate": me.mod.htScript.rate2,
"user/1/heartrate": me.mod.htScript.rate1,
"user/0/heartrate": me.mod.htScript.changeBPM,

# DEBUG
"debug_td_logo": debugLogo,
"debug_td_screen": debugScreen,


# DEBUG SHOW PLAYER
"debug_td_showPlayer1": me.mod.spScript.debugShowPlayer1,
"debug_td_showPlayer2": me.mod.spScript.debugShowPlayer2,
"debug_td_showPlayer3": me.mod.spScript.debugShowPlayer3,
"debug_td_showPlayer4": me.mod.spScript.debugShowPlayer4,
"debug_td_showPlayer5": me.mod.spScript.debugShowPlayer5,
"debug_td_showPlayer6": me.mod.spScript.debugShowPlayer6,
"debug_td_showPlayer7": me.mod.spScript.debugShowPlayer7,
"debug_td_showPlayer8": me.mod.spScript.debugShowPlayer8,
"debug_td_showPlayer9": me.mod.spScript.debugShowPlayer9,
"debug_td_showPlayer10": me.mod.spScript.debugShowPlayer10,

# SHOW FACES
"user/1/face/detect": me.mod.spScript.debugShowPlayer1,
"user/2/face/detect": me.mod.spScript.debugShowPlayer2,
"user/3/face/detect": me.mod.spScript.debugShowPlayer3,
"user/4/face/detect": me.mod.spScript.debugShowPlayer4,
"user/5/face/detect": me.mod.spScript.debugShowPlayer5,
"user/6/face/detect": me.mod.spScript.debugShowPlayer6,
"user/7/face/detect": me.mod.spScript.debugShowPlayer7,
"user/8/face/detect": me.mod.spScript.debugShowPlayer8,
"user/9/face/detect": me.mod.spScript.debugShowPlayer9,
"user/10/face/detect": me.mod.spScript.debugShowPlayer10

}

OFF TO ON

#------------------------------------------------------------------------------------------------------------

def offToOn(channel, sampleIndex, val, prev):

id = str(channel.name)		
	
for key in stateOffToOn:
	if key == id:
		stateOffToOn[id](val)
		return

return

VALUE CHANGE

#------------------------------------------------------------------------------------------------------------

def valueChange(channel, sampleIndex, val, prev):

id = str(channel.name)	

for key in stateValueChange:
	if key == id:
		stateValueChange[id](val)
		return

return

[/code]

ha, that’s a bit long.

If you see a warning or error in TouchDesigner you can click the node with middle mouse button and you see a popup with the error and a line number in which it occurs.

If you can’t find a linenumber, try to disable big parts of your code until the error goes away. That way you can quickly narrow it down.

I see, well it doesn’t stop the program or anything and the deadline is looming, so I think I’ll leave it as it is.

Thank you