We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpSyntax Questions › save () a file with objects ... unexpected token
Page Index Toggle Pages: 1
save () a file with objects ... unexpected token? (Read 280 times)
save () a file with objects ... unexpected token?
Jan 15th, 2009, 12:56pm
 
Hello,

I have tried to save out a tiff file from Examples/Basics/Objects/Neighborhood using Processing 1.0.1 on Mac OS X 10.5.6.
By adding this:
save("/Volumes/OSXX/processingCollector/house.tif");

Can I not save out files that include objects?

I do get this error:

processing.app.debug.RunnerException: unexpected token: "/Volumes/OSXX/processingCollector/house.tif"

at processing.app.Sketch.preprocess(Sketch.java:1362)

at processing.app.Sketch.build(Sketch.java:1471)

at processing.app.Sketch.compile(Sketch.java:1172)

at processing.app.Editor.handleRun(Editor.java:1564)

at processing.app.EditorToolbar.mousePressed(EditorToolbar.java:318)

at java.awt.Component.processMouseEvent(Component.java:5599)

at javax.swing.JComponent.processMouseEvent(JComponent.java:3135)

at java.awt.Component.processEvent(Component.java:5367)

at java.awt.Container.processEvent(Container.java:2010)

at java.awt.Component.dispatchEventImpl(Component.java:4068)

at java.awt.Container.dispatchEventImpl(Container.java:2068)

at java.awt.Component.dispatchEvent(Component.java:3903)

at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4256)

at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3933)

at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3866)

at java.awt.Container.dispatchEventImpl(Container.java:2054)

at java.awt.Window.dispatchEventImpl(Window.java:1801)

at java.awt.Component.dispatchEvent(Component.java:3903)

at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)

at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:2
69)

at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:190
)

at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:184)

at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:176)

at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
processing.app.debug.RunnerException: unexpected token: "/Volumes/OSXX/processingCollector/house.tif"

at processing.app.Sketch.preprocess(Sketch.java:1362)

at processing.app.Sketch.build(Sketch.java:1471)

at processing.app.Sketch.compile(Sketch.java:1172)

at processing.app.Editor.handleRun(Editor.java:1564)

at processing.app.EditorToolbar.mousePressed(EditorToolbar.java:318)

at java.awt.Component.processMouseEvent(Component.java:5599)

at javax.swing.JComponent.processMouseEvent(JComponent.java:3135)

at java.awt.Component.processEvent(Component.java:5367)

at java.awt.Container.processEvent(Container.java:2010)

at java.awt.Component.dispatchEventImpl(Component.java:4068)

at java.awt.Container.dispatchEventImpl(Container.java:2068)

at java.awt.Component.dispatchEvent(Component.java:3903)

at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4256)

at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3933)

at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3866)

at java.awt.Container.dispatchEventImpl(Container.java:2054)

at java.awt.Window.dispatchEventImpl(Window.java:1801)

at java.awt.Component.dispatchEvent(Component.java:3903)

at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)

at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:2
69)

at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:190
)

at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:184)

at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:176)

at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
Re: save () a file with objects ... unexpected tok
Reply #1 - Jan 15th, 2009, 1:17pm
 
That's a pre-processor error, not a run-time error.
That means it doesn't even try to run your sketch but finds something funny in your code. Perhaps in the previous line(s) since the one you show seems OK.
Re: save () a file with objects ... unexpected tok
Reply #2 - Jan 15th, 2009, 2:31pm
 
thanks ... but I am only adding this one line of code to one of the examples that come with processing.
The programm runs without an error until I add this one line of code!
Page Index Toggle Pages: 1