NameError

I have two functions in script modules like this.

def b():
	import fpmi
	result = a(c,d)
	fpmi.gui.messageBox(str(result));

def a(c,d):
	return c+d

I got an error when I run the function b from a button click event. I attached the error photo. Please help me again. :prayer: :prayer: :prayer:

That is because you didn’t import the namespace correctly. Do the following:[code]def b():
import fpmi, app
result = app.package.a(c,d)
fpmi.gui.messageBox(str(result));

def a(c,d):
return c+d[/code]

Thank you so much… I got it… :mrgreen: :mrgreen: