FHannes Posted February 14, 2012 Share Posted February 14, 2012 SCAR Divi 3.31 Final has been released! This is a pretty giant release, featuring an entirely new system to wrap the script engine offering better performance and stability, support for ZLib compression, HEX/Base64 encoding, SQLite3 databases and more! I'm also releasing the format for encoding SCAR bitmap strings, which will make it easier to create 3rd party tools to generate, use and store the bitmap strings. I will put up specifications in the wiki soon, currently you can check out this post: http://forums.scar-divi.com/showthread.php?914-Bitmap-Encoding The post contains a script to decode the new bitmap encoding format I added which differs little from the old one aside from some small details, but is more convenient to use. Note that you can use the appropriate tool in the tools menu to update the bitmaps using an older encoding in your scripts to this new encoding. Downloads: http://www.scar-divi.com/index.php?page=download Changelog: Bugfixes: - Small bug in loading toolbars/docks - ReadLn didn't return the result - Bug in the settingsmanager caused issues when changing the editor format - CallProc didn't return the proper result - Local variables were bugged in code completion - Bitmap updater tool had some issues with converting the b format - [#37] Bug in FindColorSpiral(Tolerance) threw access violation when initial x and y were outside of search bounds Improvements: - New interface for script engine - Improved compile/running time measurement - Vastly improved speed for displaying variable content while debugging - Updated bitmap encoding Additions: - function FileAge(const Path: string): TDateTime; - function ScriptFile: AnsiString; - function Base64ToStr(const Str: AnsiString): AnsiString; - function StrToBase64(const Str: AnsiString): AnsiString; - function HexToStr(const Str: AnsiString): AnsiString; - function StrToHex(const Str: AnsiString): AnsiString; - function ZLibCompress(const Str: AnsiString): AnsiString; - function ZLibDecompress(const Str: AnsiString): AnsiString; - function WorkspacePath: AnsiString; - const SQL_OK, SQL_ERROR, SQL_INTERNAL, SQL_PERM, SQL_ABORT, SQL_BUSY, SQL_LOCKED, SQL_FULL, SQL_ROW, SQL_DONE - function SQLOpen(const Path: string; const CreateIfNotFound: Boolean): Integer; - function SQLFree(const DBIndex: Integer): Boolean; - function SQLAssigned(const DBIndex: Integer): Boolean; - function SQLLastID(const DBIndex: Integer): Integer; - procedure SQLStart(const DBIndex: Integer; const TransactionType: TSQLTransactionType); - procedure SQLCommit(const DBIndex: Integer); - procedure SQLRollback(const DBIndex: Integer); - procedure SQLQuery(const DBIndex: Integer; const Query: string); - function SQLQueryEx(const DBIndex: Integer; const Query: string): Integer; - function SQLQueryFree(const QueryIndex: Integer): Boolean; - function SQLQueryAssigned(const QueryIndex: Integer): Boolean; - function SQLQueryStep(const QueryIndex: Integer): Integer; - function SQLQueryReset(const QueryIndex: Integer): Integer; - procedure SQLBindStr(const QueryIndex, ParamIndex: Integer; const Str: string); - procedure SQLBindInt(const QueryIndex, ParamIndex: Integer; const Int: Integer); - procedure SQLBindInt64(const QueryIndex, ParamIndex: Integer; const Int: Int64); - procedure SQLBindByte(const QueryIndex, ParamIndex: Integer; const _Byte: Byte); - procedure SQLBindBool(const QueryIndex, ParamIndex: Integer; const Bool: Boolean); - function SQLColumnStr(const QueryIndex, ColumnIndex: Integer): string; - function SQLColumnInt(const QueryIndex, ColumnIndex: Integer): Integer; - function SQLColumnInt64(const QueryIndex, ColumnIndex: Integer): Int64; - function SQLColumnByte(const QueryIndex, ColumnIndex: Integer): Byte; - function SQLColumnBool(const QueryIndex, ColumnIndex: Integer): Boolean; Removed: - BitmapFromString2 Enjoy this release! ~Freddy Quote Link to comment Share on other sites More sharing options...
Janilabo Posted February 14, 2012 Share Posted February 14, 2012 YAY! Sweet release Freddy, thanks for all the hard work you put into this version. Awesomness! Lovin' it. Quote Link to comment Share on other sites More sharing options...
k0rsakoff Posted February 14, 2012 Share Posted February 14, 2012 has the bot's function overall improved? Or will script writers have to adapt their scripts first? Quote Link to comment Share on other sites More sharing options...
FHannes Posted February 14, 2012 Author Share Posted February 14, 2012 has the bot's function overall improved? Or will script writers have to adapt their scripts first? It's not a bot, and no backwards compatibility was broken other than BitmapFromString2 which hasn't been used for years, so there shouldn't be any scripts actually using it. Also only WriteLn is now exported to plugins, but this is also almost never used, and only applies to plugins. Quote Link to comment Share on other sites More sharing options...
twenty_sleven Posted February 14, 2012 Share Posted February 14, 2012 I'm stoked for the bitmap encoding! Quote Link to comment Share on other sites More sharing options...
Home Posted February 14, 2012 Share Posted February 14, 2012 All I can say well done mate. Well done.. : ) ~Home Quote Link to comment Share on other sites More sharing options...
infinitejl Posted February 14, 2012 Share Posted February 14, 2012 Omg this awesome, cant wait to learn database stuff ;P Quote Link to comment Share on other sites More sharing options...
Naum Posted February 14, 2012 Share Posted February 14, 2012 Freddy you da man! Quote Link to comment Share on other sites More sharing options...
Wanted Posted February 15, 2012 Share Posted February 15, 2012 Gj! New code hints make a huge difference when scripting for long hours Quote Link to comment Share on other sites More sharing options...
Bixby Sayz Posted February 15, 2012 Share Posted February 15, 2012 Gj! New code hints make a huge difference when scripting for long hoursNever realized how much I use code hints until they weren't there. I was running 2 copies of SCAR: One old, one new, just so I could flip over and do code hints. Quote Link to comment Share on other sites More sharing options...
Wanted Posted February 15, 2012 Share Posted February 15, 2012 They've always been there just not as efficient as they are now. Quote Link to comment Share on other sites More sharing options...
Bixby Sayz Posted February 15, 2012 Share Posted February 15, 2012 They've always been there just not as efficient as they are now.No. They were broken for a while for a few of the pre-release versions. That is when I noticed how much I really use them. Quote Link to comment Share on other sites More sharing options...
Wanted Posted February 16, 2012 Share Posted February 16, 2012 No. They were broken for a while for a few of the pre-release versions. That is when I noticed how much I really use them. Ah in the prerelease copies, yes.. Quote Link to comment Share on other sites More sharing options...
Bixby Sayz Posted February 16, 2012 Share Posted February 16, 2012 Speaking of which: Freddy, I filed a bug report for an issue with code hints/code completion that's been driving me crazy. They work, just not when editing my script. Edit any other script and they work. Fire up my script in the editor and they stop working. I have been going insane trying to figure out if it is something wrong with my script or I just hit an obscure bug. Starting to feel a bit paranoid: Is he doing it just to mess with my head? Quote Link to comment Share on other sites More sharing options...
Neron Posted February 16, 2012 Share Posted February 16, 2012 not your head someting is wrong [scar] program new; var list : Tstringlist; begin list := TStringList.Create; // I dont get object propeties. list.Free; end. [/scar] Quote Link to comment Share on other sites More sharing options...
Janilabo Posted February 17, 2012 Share Posted February 17, 2012 not your head someting is wrong [scar] program new; var list : Tstringlist; begin list := TStringList.Create; // I dont get object propeties. list.Free; end. [/scar] I reported that to Mantis. Remember to always report the bugs there, so they wont go unnoticed. Quote Link to comment Share on other sites More sharing options...
shadowrecon Posted February 18, 2012 Share Posted February 18, 2012 I like the new features in scar 3.31 but it seems to be really buggy, ive finally manage to make a mantis account and report the bugs, I think it should of had a bit more beta testing before release. Im sure you will get the errors fixed, but for now im reverting back to 3.30. Quote Link to comment Share on other sites More sharing options...
FHannes Posted February 19, 2012 Author Share Posted February 19, 2012 I like the new features in scar 3.31 but it seems to be really buggy, ive finally manage to make a mantis account and report the bugs, I think it should of had a bit more beta testing before release. Im sure you will get the errors fixed, but for now im reverting back to 3.30. The only bug you've reported doesn't seem to be a bug... ScriptPath works fine for me and Janilabo, maybe you didn't actually save the script first? Quote Link to comment Share on other sites More sharing options...
shadowrecon Posted February 20, 2012 Share Posted February 20, 2012 (edited) Im sorry, I was jsut upset with that function not working. I am currently back on scar 3.31 because i like the new features over an image loading.. lol. Asfar as the image loading that has been one of my headaches over this weekend. See it always worked before in 3.30. See here is what i was doing.. ScriptFolder/ -> MainScript.Scar ScriptData/ -> Image.png Form.Scar The issue was loadfromfile, for some reason in 3.31 when i called LoadFromFile(BackGround, ScriptPath+'image.png'); it doesnt load the file. But if i pass the location as a variable from the mainscript to the form.scar file it works.. now keep in mind the way i have this set up worked in Scar 3.30. So something has changed. Or in scar 3.30 my script was running on sheer luck. Edited February 20, 2012 by shadowrecon Quote Link to comment Share on other sites More sharing options...
Wanted Posted February 20, 2012 Share Posted February 20, 2012 Im sorry, I was jsut upset with that function not working. I am currently back on scar 3.31 because i like the new features over an image loading.. lol. Asfar as the image loading that has been one of my headaches over this weekend. See it always worked before in 3.30. See here is what i was doing.. ScriptFolder/ -> MainScript.Scar ScriptData/ -> Image.png Form.Scar The issue was loadfromfile, for some reason in 3.31 when i called LoadFromFile(BackGround, ScriptPath+'image.png'); it doesnt load the file. But if i pass the location as a variable from the mainscript to the form.scar file it works.. now keep in mind the way i have this set up worked in Scar 3.30. So something has changed. Or in scar 3.30 my script was running on sheer luck. ScriptPath works You should be using LoadBitmap(Path) instead of LoadFromFile Quote Link to comment Share on other sites More sharing options...
shadowrecon Posted February 20, 2012 Share Posted February 20, 2012 ScriptPath worksYou should be using LoadBitmap(Path) instead of LoadFromFile Can i load a .png file with LoadBitmap? Quote Link to comment Share on other sites More sharing options...
Wanted Posted February 21, 2012 Share Posted February 21, 2012 Can i load a .png file with LoadBitmap? Probably not, why not just use a .bmp?? Quote Link to comment Share on other sites More sharing options...
shadowrecon Posted February 21, 2012 Share Posted February 21, 2012 Probably not, why not just use a .bmp?? The reason im using loadfromfile is because its made for tsender objects. As of now the problem is solved just took a little working around. The problem was not loading the file but getting the path. For some reason if i called the script from another script it returned nothing as script path, where as if i passed the path to the script from the main script it worked. Strange thing is it worked before scar 3.31. Quote Link to comment Share on other sites More sharing options...
FHannes Posted February 21, 2012 Author Share Posted February 21, 2012 The reason im using loadfromfile is because its made for tsender objects.As of now the problem is solved just took a little working around. The problem was not loading the file but getting the path. For some reason if i called the script from another script it returned nothing as script path, where as if i passed the path to the script from the main script it worked. Strange thing is it worked before scar 3.31. What you're claiming is not possible. The ScriptPath function will return the path of the script you're running, not of the file you use it in, obviously. This has always been the case. Quote Link to comment Share on other sites More sharing options...
shadowrecon Posted February 21, 2012 Share Posted February 21, 2012 What you're claiming is not possible. The ScriptPath function will return the path of the script you're running, not of the file you use it in, obviously. This has always been the case. For some reason it always worked before images always loaded. Other wise i wouldnt be saying it was bug. It must of just been running on a fluke.. but me and RSutton scripts are setup like that to load the images. I am now just passing the path through a var to the script. Quote Link to comment Share on other sites More sharing options...