sfall script editor

Ardent said:
1) I had a script and an msg file opened. I closed the SSL file. The MSG was still open. I chose 'close' from the menu and the following popped up:
ok, I know what's causing that. Will get it fixed.

Ardent said:
2) When you open an existing SSL, it doesn't read the file structure (i.e. doesn't list the procedures in the rightmost window). This is the same with files created from templates. When you write a new file from scratch, it seems to work ok.
Bah, thought I'd changed that already. In that case, with a newly opened file it wont update that list until the text changes. (So you can type something and undo it to get it to update.)

The templates (and other new files, up until they're saved,) are by design though; you need to save it somewhere first before it can read it, or it wont know where to find the headers.
 
Timeslip said:
Bah, thought I'd changed that already. In that case, with a newly opened file it wont update that list until the text changes. (So you can type something and undo it to get it to update.)

All right, I have another problem. I did as you said and it still doesn't work for me. Now, I've noticed a little piece of text saying 'parser this', 'parser that'. Here's what happens on my copy:
1. I open an ssl file.
2. The parser says "failed"
3. I write some stuff, I save.
4. The line says: 'Parser out of date', then immediately 'Working' and after a split of a second, it goes 'failed'.

I noticed a curious thing though:

1. Most of my scripts start with comments saying stuff like:
Code:
/*
NPC name: X
Location: Y
Role: Z
*/
2. I opened a script which contained no such comment and the program immediately recognised its structure.
3. I opened a "commented" file and moved the start procedure declaration from below the comments to the beginning of the file. I pressed Ctrl+S and the program hung up.

Is that any clue?
 
Is there any way to increase the speed of the camera when scrolling around with the keyboard? At the moment it's pretty slow and moves in chunks while scrolling with the mouse is fast and fluid.
 
Ardent said:
4. The line says: 'Parser out of date', then immediately 'Working' and after a split of a second, it goes 'failed'.
Then there's a problem with your script, and it couldn't be compiled. Once the script compiles successfully, you'll get that information back. (Along with the tooltips, etc. that also depend on the parser info.)

Edit: or if you have a script that compiles successfully, but still can't be parsed, then that's a bug I need to fix.

Phil the Nuka-Cola Dude said:
Is there any way to increase the speed of the camera when scrolling around with the keyboard? At the moment it's pretty slow and moves in chunks while scrolling with the mouse is fast and fluid.
umm... Completely the wrong thread. :P
 
Timeslip said:
Then there's a problem with your script, and it couldn't be compiled. Once the script compiles successfully, you'll get that information back. (Along with the tooltips, etc. that also depend on the parser info.)

Indeed, it doesn't compile. But it does on FSE. In fact, the error info is about a header file I'm using:

Code:
[Error] <C>:3: Not an identifier "0_astlin_H"

    #ifndef 0_astlin_H
    from 0Aaaron.ssl: 14:    #include "C:\Gry\Fallout 2\Fallout 2 Mapper\scripts\HEADERS\0_astlin.h"

This header file was created by FSE. If compared to one of the original header files for the towns, it looks pretty much analogous:

My file:

Code:
//      *** Created by Fallout Script Editor. ***

#ifndef 0_astlin_H
#define 0_astlin_H

(...)

#endif // 0_astlin_H

Broken Hills header:

Code:
/*
	Copyright 1998-2003 Interplay Entertainment Corp.  All rights reserved.
*/

#ifndef BROKEN1_H
#define BROKEN1_H

(...)

#endif // BROKEN1_H

I commented out my header-include, and added a new header, the BROKEN1.H (two attempts: manually in your editor and with FSE). In both cases, the following error occured (looks pretty much the same as I posted before):

Wartość startIndex musi być mniejsza niż długość ciągu = The value of startIndex must be smaller than the sequence?/array? length.

[spoiler:d334137bf4]
Code:
************** Tekst wyjątku **************
System.ArgumentOutOfRangeException: Wartość startIndex musi być mniejsza niż długość ciągu.
Nazwa parametru: startIndex
   w System.String.Remove(Int32 startIndex)
   w ScriptEditor.Compiler.AddMacro(String line, Dictionary`2 macros, String file, Int32 lineno)
   w ScriptEditor.Compiler.GetMacros(String file, String dir, Dictionary`2 macros)
   w ScriptEditor.Compiler.GetMacros(String file, String dir, Dictionary`2 macros)
   w ScriptEditor.Compiler.Parse(String file, String path)
   w ScriptEditor.TextEditor.bwSyntaxParser_DoWork(Object sender, DoWorkEventArgs e)
   w System.ComponentModel.BackgroundWorker.OnDoWork(DoWorkEventArgs e)
   w System.ComponentModel.BackgroundWorker.WorkerThreadStart(Object argument)


************** Zestawy załadowane **************
mscorlib
    Wersja zestawu: 2.0.0.0
    Wersja Win32: 2.0.50727.4200 (NetFxQFE.050727-4200)
    CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
ScriptEditor
    Wersja zestawu: 2.10.0.0
    Wersja Win32: 2.10.0.0
    CodeBase: file:///C:/Gry/Fallout%202/Tools/Timeslips%20script%20editor/ScriptEditor.exe
----------------------------------------
System.Windows.Forms
    Wersja zestawu: 2.0.0.0
    Wersja Win32: 2.0.50727.4016 (NetFxQFE.050727-4000)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System
    Wersja zestawu: 2.0.0.0
    Wersja Win32: 2.0.50727.4016 (NetFxQFE.050727-4000)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
    Wersja zestawu: 2.0.0.0
    Wersja Win32: 2.0.50727.4016 (NetFxQFE.050727-4000)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
ICSharpCode.TextEditor
    Wersja zestawu: 3.2.0.5777
    Wersja Win32: 3.2.0.5777
    CodeBase: file:///C:/Gry/Fallout%202/Tools/Timeslips%20script%20editor/ICSharpCode.TextEditor.DLL
----------------------------------------
System.Windows.Forms.resources
    Wersja zestawu: 2.0.0.0
    Wersja Win32: 2.0.50727.4016 (NetFxQFE.050727-4000)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Windows.Forms.resources/2.0.0.0_pl_b77a5c561934e089/System.Windows.Forms.resources.dll
----------------------------------------
System.Xml
    Wersja zestawu: 2.0.0.0
    Wersja Win32: 2.0.50727.4016 (NetFxQFE.050727-4000)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
mscorlib.resources
    Wersja zestawu: 2.0.0.0
    Wersja Win32: 2.0.50727.4200 (NetFxQFE.050727-4200)
    CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
System.resources
    Wersja zestawu: 2.0.0.0
    Wersja Win32: 2.0.50727.4016 (NetFxQFE.050727-4000)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.resources/2.0.0.0_pl_b77a5c561934e089/System.resources.dll
----------------------------------------
[/spoiler:d334137bf4]

Finally, I changed the name of my header file not to include a number at the beginning. Now it seems to work, except that it still gives me the error above (but it compiles).
 
Ardent said:
#ifndef 0_astlin_H
Yes, that's your problem. Symbol names are not allowed to begin with a number. I'm surprised that FSE compiled that at all; it's a hard error in just about every preprocessor I know. I wonder what it uses to do its preprocessing...

On a related note, there are also some other scripts that FSE will compile that my editor wont because of another preprocessor quirk. The macros to add new dialog choices take 3 arguments, but in some scripts there are 4 given. Using visual studio's preprocessor, (and presumably FSE, if it gives warnings.) that's just a warning, but it's a hard error in mine. (I'm using mcpp in standard mode. It might be a bit more relaxed if I use compat mode instead, but I'm sticking with standard atm.)
 
Timeslip said:
Yes, that's your problem. Symbol names are not allowed to begin with a number. I'm surprised that FSE compiled that at all; it's a hard error in just about every preprocessor I know. I wonder what it uses to do its preprocessing...

I think I saw a notice like that somewhere, but since it worked for me, I never bothered to change it. Now, I'll have to modify all of my headers (and map names too, for convenience)! Damn! :|

And now to something completely different:

Do you plan to add any icon toolbar for your editor? I found it very useful in FSE, I think your editor could use one too.

And also an option to include files from a pop-up window (like it is with FSE when you press F5).

And one more bug:

This one happened when I right-clicked on the #include line and chose the option 'open include'.

Translation attempt:

Wartość nie może być zerowa. = The value cannot be null.

[spoiler:d44e9416ba]
Code:
************** Tekst wyjątku **************
System.ArgumentNullException: Wartość nie może być zerowa.
Nazwa parametru: path1
   w System.IO.Path.Combine(String path1, String path2)
   w ScriptEditor.TextEditor.openIncludeToolStripMenuItem_Click(Object sender, EventArgs e)
   w System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
   w System.Windows.Forms.ToolStripMenuItem.OnClick(EventArgs e)
   w System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
   w System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
   w System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met)
   w System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met)
   w System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
   w System.Windows.Forms.ToolStripDropDown.OnMouseUp(MouseEventArgs mea)
   w System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   w System.Windows.Forms.Control.WndProc(Message& m)
   w System.Windows.Forms.ScrollableControl.WndProc(Message& m)
   w System.Windows.Forms.ToolStrip.WndProc(Message& m)
   w System.Windows.Forms.ToolStripDropDown.WndProc(Message& m)
   w System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   w System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   w System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** Zestawy załadowane **************
mscorlib
    Wersja zestawu: 2.0.0.0
    Wersja Win32: 2.0.50727.4200 (NetFxQFE.050727-4200)
    CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
ScriptEditor
    Wersja zestawu: 2.10.0.0
    Wersja Win32: 2.10.0.0
    CodeBase: file:///C:/Gry/Fallout%202/Tools/Timeslips%20script%20editor/ScriptEditor.exe
----------------------------------------
System.Windows.Forms
    Wersja zestawu: 2.0.0.0
    Wersja Win32: 2.0.50727.4016 (NetFxQFE.050727-4000)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System
    Wersja zestawu: 2.0.0.0
    Wersja Win32: 2.0.50727.4016 (NetFxQFE.050727-4000)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
    Wersja zestawu: 2.0.0.0
    Wersja Win32: 2.0.50727.4016 (NetFxQFE.050727-4000)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
ICSharpCode.TextEditor
    Wersja zestawu: 3.2.0.5777
    Wersja Win32: 3.2.0.5777
    CodeBase: file:///C:/Gry/Fallout%202/Tools/Timeslips%20script%20editor/ICSharpCode.TextEditor.DLL
----------------------------------------
System.Windows.Forms.resources
    Wersja zestawu: 2.0.0.0
    Wersja Win32: 2.0.50727.4016 (NetFxQFE.050727-4000)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Windows.Forms.resources/2.0.0.0_pl_b77a5c561934e089/System.Windows.Forms.resources.dll
----------------------------------------
System.Xml
    Wersja zestawu: 2.0.0.0
    Wersja Win32: 2.0.50727.4016 (NetFxQFE.050727-4000)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
mscorlib.resources
    Wersja zestawu: 2.0.0.0
    Wersja Win32: 2.0.50727.4200 (NetFxQFE.050727-4200)
    CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
[/spoiler:d44e9416ba]
 
Reuploaded with fixes for those three nasty bugs. (Edit: specifically macros with multiple arguments but no definitions, the #include crash and the close crash.)

Ardent said:
I think I saw a notice like that somewhere, but since it worked for me, I never bothered to change it. Now, I'll have to modify all of my headers (and map names too, for convenience)! Damn! :|
It wont stop you having to modify all the headers, but you can use '#pragma once' rather than #ifndef guards.

Ardent said:
Do you plan to add any icon toolbar for your editor? I found it very useful in FSE, I think your editor could use one too.
I wasn't intending to. What sort of icons did you want there? The most commonly clicked items from the menus are available via keyboard shortcuts already, and having the same options again in a third location seems like overkill.

Ardent said:
And also an option to include files from a pop-up window (like it is with FSE when you press F5).
That'll come whenever I get around to doing code completion. Probably wont be any time soon, sorry.
 
Timeslip said:
It wont stop you having to modify all the headers, but you can use '#pragma once' rather than #ifndef guards.

What does it do? I mean, what's the difference?

I wasn't intending to. What sort of icons did you want there? The most commonly clicked items from the menus are available via keyboard shortcuts already, and having the same options again in a third location seems like overkill.

It doesn't to me. Most programs have this kind of triple access. Take MS Word (I'm not saying this is a well-executed program, but it's for n00bs like me) - you have menu access, you have icons and you have keyboard shortcuts. Basically every noob-friendly program has this kind of icons, because people are visual creatures and like pictures.

I'd place the usual new/open/save icons. Plus:
* register script
* compile script

More options could be added when the program has more functionalities (like add procedure, or add variable).

That'll come whenever I get around to doing code completion. Probably wont be any time soon, sorry.

I'll wait patiently :wink:
 
Hello (I'm sorry for my bad English),
I found bug if I tried to save msg file. Characters with diacritical mark are displayed correctly after loading file, but after saving (with editor) are replaced by question marks (only in file, editor still display this chracters correctly until I load file again).

About saving ssl file: Quite often editor during saving freeze for good.
 
Ardent said:
What does it do? I mean, what's the difference?
There is none. The purpose of wrapping the file in the '#ifndef foo' block is so that should the header be included more than once you wont have any problems with variable redefinition or whatever else is in the header. (The second time around foo will be defines, the block will be skipped and the whole file will look empty.) That's exactly what '#pragma once' does; it tells the preprocessor that the file should only ever be included once. The only reason not to use it is that older preprocessors don't support it. (I know visual studio does, at least.)

Ardent said:
Basically every noob-friendly program has this kind of icons, because people are visual creatures and like pictures.
I'm not aiming at noobs though. Would you personally use the icons if they were there, rather than the much faster keyboard shortcuts?

TyfuZ said:
Hello (I'm sorry for my bad English),
I found bug if I tried to save msg file. Characters with diacritical mark are displayed correctly after loading file, but after saving (with editor) are replaced by question marks (only in file, editor still display this chracters correctly until I load file again).
The editor is hardcoded for english atm. Files are all saved in ascii, and it uses the english text folder. The characters that were replaced presumably have no ascii representation.

I've no idea how fallout handles text in non-english versions. It has no multibyte character support, so what format am I supposed to save the files in? I can switch to the default codepage, but then characters >127 wouldn't be guaranteed to be displayed the same in game as they do in the editor.

TyfuZ said:
About saving ssl file: Quite often editor during saving freeze for good.
Do you have some repeatable way to trigger this? I haven't been able to see it myself.
 
Thanks for answer.

I've no idea how fallout handles text in non-english versions. It has no multibyte character support, so what format am I supposed to save the files in? I can switch to the default codepage, but then characters >127 wouldn't be guaranteed to be displayed the same in game as they do in the editor.

I don't know exactly how it works (for this there are some special font files, I think), but I think that default codepage will be probably work. BTW.: Could you add possibility to change text folder, please?

Do you have some repeatable way to trigger this? I haven't been able to see it myself.

I haven't but I'll try to find pattern of this behavior.
 
TyfuZ said:
I haven't but I'll try to find pattern of this behavior.
Actually, I think I see the problem. It's a race condition with the syntax parser. (Which runs in a background thread.) I'll fix it for the next release, but in the meantime you can avoid it by never saving while 'Parser: Working' is displayed in the top right corner.
 
Timeslip said:
TyfuZ said:
I haven't but I'll try to find pattern of this behavior.
Actually, I think I see the problem. It's a race condition with the syntax parser. (Which runs in a background thread.) I'll fix it for the next release, but in the meantime you can avoid it by never saving while 'Parser: Working' is displayed in the top right corner.

Great, thanks!

Is there any possibility of popup menu for right click on top of tab with "close file" etc. (like in Visual Studio) ??

Anyway, your editor is great thing, very helpful :wink:
 
TyfuZ said:
Is there any possibility of popup menu for right click on top of tab with "close file" etc. (like in Visual Studio) ??
You can middle click a tab to close it. (Works with the search results in the bottom panel too.)
 
Something changed with the download link? The one in the first post brings me to some 404 page.
 
Hi, thanks for great editor. It really helps make things faster.

But how about add something like plugin support? I work for Fallout:BGE project and we do lots of repetitive work always. For now i use for every task special tool, but it is still slow for using.

Plugins should do:
  • add commands to menu
  • if it is more complex plugin, show some window with settings or something
  • modify source code (or open/close file)

Thank you!
 
Lexx said:
Something changed with the download link? The one in the first post brings me to some 404 page.
It's been in the sfall modders pack since 2.10. I'll change that link.

It's is a bit more updated than the last one at that link too; I've fixed the saving hang, and possibly some other stuff. Nothing new though.

existent said:
But how about add something like plugin support?
It's a possibility for later, but I'm not planning to do any more work on it for a while. For now, since it's open source, you can skip using plugins and just add things directly.
 
any possibility of adding a replace function to the edtitor?i am using this editor for everything(cept for vs progs) and i use that feature quite often,if it is too much woirk or very difficulty,forget it

Nirran
 
Back
Top