Entraides et échanges autour de la technologie Scol - Informations and exchanges on the Scol technology
Vous pouvez changer la langue de l'interface une fois inscrit - You can change the language once registered
You are not logged in.
Pages: 1
colleagues:
i wrote the following text in a .scol file
_showconsole
_fooS ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>Hello world !"
I placed the file in theDocuments and Settings\ADMIN\My Documents\Scol Voyager\Partition_LocalUsr\scol_programs folder. When I run the script, I see a sequence of functions listed by no "hello world":
Am I missing something?
Offline
You must set the log mask in the Scol configuration panel (right click on scol icon and select Configure).
You can set it to "FOO" (or more)
I add this in the FAQ
Offline
thx, now i see the whole list of text lines, and then "hello world" at the bottom...is this what i should be seeing?
Offline
thanks iri....now that i think about it i'll play more with openspace so i thoroughly understand the existing plugin system, most importantly the logic and math plugits.
-h
Offline
With this text in a .scol file (at the root of the Partition_LocalUsr directory), the console appears:
_showconsole
_fooS “>>>>>>>>>>>> Hello World and Bonjour”
Then I created a folder named Tutorial in the root of the Partition_LocalUsr directory.
Then I created hello1.scol, which contains the code:
_load “Tutorial/hello1.pkg”
main
and hello1.pkg, which contains the code:
fun main()=
_showconsole;
_fooS “>>>>>>>>>>>> Hello World”;;
but no console window appears. here is where I presume the error appears in the .log file:
WRITE_OK
(!) Illegal character '\ffffffef'
(!) Line #1:
??_load “Tutorial/hello1.pkgâ€
(!) Function call was skipped since it could not be resolved
(!) Function 'main' is not defined in channel environment
(!) Line #3:
??main
(!) Function call was skipped since it could not be resolved
READ 1140
>CHK BUF:
1: 0
6: 0
>SCread 7
I assume I'm missing something, but I don't know where.
Thanks!
-h
Last edited by hebdemnobad (10-Nov-2011 18:21:18)
Offline
i cut and pasted the code from this thread into bluefish and saved out the .sol and .pkg files from bluefish, still no success.
Offline
Make sure that your pkg files are in ascii and not UTF8
I can't figure out how to do that with windows notepad, bluefish, or dreamweaver (i thought i'd try that too.)
Offline
Look at the Preferences to change the default encoding
I can't find that option in the preferences dialog in bluefish.
Offline
With Notepad++ :
Menu Settings >> Preferences
In the dialog box, go to tab "New document / Default directory"
Set "Format" = Windows
Set "Encoding" = Ansi
Clicks on Close button.
With Bluefish :
Menu Edit >> Preferences
In the dialog box, select Files (in the list, at left)
In "Encoding" (at right), choose Windows-1251 instead of "UTF-8"
I hope it works
Offline
With Notepad++ :
Menu Settings >> Preferences
In the dialog box, go to tab "New document / Default directory"
Set "Format" = Windows
Set "Encoding" = Ansi
Clicks on Close button.With Bluefish :
Menu Edit >> Preferences
In the dialog box, select Files (in the list, at left)
In "Encoding" (at right), choose Windows-1251 instead of "UTF-8"I hope it works
i followed your directions (thanks!) and just pasted in the text from this thread into both notepad++ and bluefish. the voyager still flags the same error.
Offline
Oh, i didn't see your quote !! Sorry
“ and ” are incorrects
you must use " " only
Try this :
_load "Tutorial/hello1.pkg"
main
and
fun main()=
_showconsole;
_fooS ">>>>>>>>>>>> Hello World";
It works fine
Offline
aha! that's what i get for trying my french! now there is an error a bit more serious, but nothing on my end (i think):
> exec: _connected
WRITE_OK
> exec: _load "Tutorial/hello1.pkg"
F:/Partition_LocalUsr/ - Tutorial/hello1.pkg - F:\Partition_LocalUsr\tutorial\hello1.pkg
Loading F:\Partition_LocalUsr\tutorial\hello1.pkg ...
typechecking
line 458 in ..\..\..\vm\kernel5\src\compiler\typmag2.cpp
File : F:\Partition_LocalUsr\tutorial\hello1.pkg
(!) Line #3:
_fooS ">>>>>>>>>>>> Hello World";
syntax error
Dead Scol Machine -2 (0)
syntax error
EndScolMachine -1
delete servers
SCKend-
flagactiveX=0
Offline
Yes, i make a mistake ... I missed the double semicolon at the end of the function when i stupidely copied it
fun main()=
_showconsole;
_fooS ">>>>>>>>>>>> Hello World";;
Offline
Yes, i make a mistake ... I missed the double semicolon at the end of the function when i stupidely copied it
fun main()= _showconsole; _fooS ">>>>>>>>>>>> Hello World";;
yay, it works!
a question on scol and ogre....to manipulate the parts of ogre and newton that the existing os3d plugits access, all i need to know is scol.
but to access stuff like hydrax or skyx that is not yet implemented with plugits (or partially), i need to program the connection between the scol voyager and ogre/newton with c++...did i get that right?
Last edited by hebdemnobad (10-Nov-2011 20:20:29)
Offline
Yes, you should define the Scol api functions and then, load them by the SO3Engine plugin. It is quite complicated ...
A remark :
The Scol voyager is a graphical interface : the Scol icon in your taskbar, the contextual menu, the configuration panel, ...
The Scol engine is the primary (mother if you want) virtual machine. The Scol voyager is a "wrapper" of the Scol engine.
Scol is an interpreted language. When you launch an application (your HelloWorld or Openspace3d), packages written in Scol are loaded and ran in a new Scol virtual machine linked at the Scol engine.
A package is a *.pkg file. It contains a source code written in Scol. Your HelloWorld contains one package. Openspace3d contains a lot of packages. The principle is the same.
Offline
thx for that iri
Offline
Pages: 1