Hello guys my name is Gustavo and iam from Brazil, i would like to know how to how to Write variable value into (Ex:test.txt) file.
Iam using this code inside WebConsole " File::open('c:\foo.txt', 'wb') {|f| f.write $variablename } " it Works!!! create a file and writes variable value but when i try this same code inside Script area give me this msg error
String doesn't compile: Error in Script:
File::open('foo.txt', 'wb') {|f| f.write 'ruby!' }
String doesn't compile: Error in Script:
File::open('c:\foo.txt', 'wb') {|f| f.write 'ruby!' }
private method `open' called for MSketchyPhysics3::SP3xCommonContext::File:Class#<RuntimeError: Error in Script:
File::open('c:\foo.txt', 'wb') {|f| f.write 'ruby!' }
private method `open' called for MSketchyPhysics3::SP3xCommonContext::File:Class>
C:/PROGRA~2/Google/GOOGLE~1/Plugins/SketchyPhysics3/ControllerCommands.rb:1314:in `initEvents'
C:/PROGRA~2/Google/GOOGLE~1/Plugins/SketchyPhysics3/ControllerCommands.rb:1342:in `initialize'
C:/PROGRA~2/Google/GOOGLE~1/Plugins/SketchyPhysics3/ControllerCommands.rb:729:in `new'
C:/PROGRA~2/Google/GOOGLE~1/Plugins/SketchyPhysics3/ControllerCommands.rb:729:in `createBody'
C:/PROGRA~2/Google/GOOGLE~1/Plugins/SketchyPhysics3/sketchyphysicstool.rb:387:in `createBodyFromCollision'
C:/PROGRA~2/Google/GOOGLE~1/Plugins/SketchyPhysics3/sketchyphysicstool.rb:254:in `dumpCollision'
C:/PROGRA~2/Google/GOOGLE~1/Plugins/SketchyPhysics3/sketchyphysicstool.rb:238:in `each'
C:/PROGRA~2/Google/GOOGLE~1/Plugins/SketchyPhysics3/sketchyphysicstool.rb:238:in `dumpCollision'
C:/PROGRA~2/Google/GOOGLE~1/Plugins/SketchyPhysics3/sketchyphysicstool.rb:763:in `initialize'
C:/PROGRA~2/Google/GOOGLE~1/Plugins/SketchyPhysics3/sketchyphysicstool.rb:1623:in `new'
C:/PROGRA~2/Google/GOOGLE~1/Plugins/SketchyPhysics3/sketchyphysicstool.rb:1623:in `startphysics'
C:/PROGRA~2/Google/GOOGLE~1/Plugins/SketchyPhysics3/sketchyphysicstool.rb:1650:in `physicsTogglePlay'
C:/PROGRA~2/Google/GOOGLE~1/Plugins/SketchyPhysics3/sketchyphysicstool.rb:1738
(eval):3:in `call'
(eval):3

