WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 07-23-2009, 02:12 AM
jaylocco jaylocco is offline
Member
 
Join Date: Jun 2009
Posts: 19
Vizact.call error

hi,

I got this problem..I kept on getting error with this code

Code:
action = vizact.sequence(vizact.call(Pushed.visible,True),vizact.call(PushedWalkBtn))
vizact.onpick( PushBox, Pushed.runAction, action)

def PushedWalkBtn():
	stopcollide()
	carPAUSEaction()
	inviscar()
and the result says

action = vizact.sequence(vizact.call(Pushed.visible,True),v izact.call(PushedWalkBtn()))
NameError: name 'PushedWalkBtn' is not defined


to what I saw in Vizard help, the syntax should be no problem which is
<vizact>.call(
func
args
)

May I know what was the problem?

THANKs
Reply With Quote
  #2  
Old 07-23-2009, 09:49 AM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
You are referencing the PushedWalkBtn function before you define it. That is why the error says PushedWalkBtn is not defined.

Just place the function definition above the action definition and it should work:
Code:
def PushedWalkBtn():
	stopcollide()
	carPAUSEaction()
	inviscar()

action = vizact.sequence(vizact.call(Pushed.visible,True),vizact.call(PushedWalkBtn))
vizact.onpick( PushBox, Pushed.runAction, action)
Reply With Quote
  #3  
Old 07-23-2009, 06:51 PM
jaylocco jaylocco is offline
Member
 
Join Date: Jun 2009
Posts: 19
hah...silly me...thanks for correcting..
Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
5DT glove ultra error 5dt.dls failed kabk Vizard 2 05-05-2009 12:43 PM
Loading morph mesh error. vEsotu Vizard 2 03-14-2009 06:29 PM
Strange Wii Mote error... shivanangel Vizard 8 02-18-2009 12:32 PM
Error Message Jerhy Vizard 1 02-28-2006 01:59 PM
The error window that couldn't FlyingWren Vizard 2 12-02-2003 08:23 AM


All times are GMT -7. The time now is 05:54 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC