Neron Posted January 13, 2012 Share Posted January 13, 2012 Is there any limitation for line length? Quote Link to comment Share on other sites More sharing options...
shadowrecon Posted January 13, 2012 Share Posted January 13, 2012 i dont know the correct answer for that but i know 255 char is suppose to be the limit for formatting purposes but ive made lives twice that length before, may i ask why you would want a line to be longer than 255? lol Quote Link to comment Share on other sites More sharing options...
Neron Posted January 13, 2012 Author Share Posted January 13, 2012 for BitmapFromString or for obfuscate code Quote Link to comment Share on other sites More sharing options...
shadowrecon Posted January 13, 2012 Share Posted January 13, 2012 oh ok well give it a shot, but im pretty sure 255 is just for formatting and as i understand how compilers work, they remove all white space, and user comments and ect so i dont think it should matter heck you could prob write your whole code on one line! woah! what a mess that would be! Quote Link to comment Share on other sites More sharing options...
rsutton Posted January 13, 2012 Share Posted January 13, 2012 Scar has no limittations when it comes to how long a code can be. Ive seen bitmaps way overweight. Quote Link to comment Share on other sites More sharing options...
shadowrecon Posted January 15, 2012 Share Posted January 15, 2012 it does have limitations to code length as of now till the new engine, about 9000 lines is max then the editor gets buggy, and lags alot. (Try it) and he was asking the length of one line of code from right to left not top to bottom =p Quote Link to comment Share on other sites More sharing options...
FHannes Posted January 15, 2012 Share Posted January 15, 2012 it does have limitations to code length as of now till the new engine, about 9000 lines is max then the editor gets buggy, and lags alot. (Try it) and he was asking the length of one line of code from right to left not top to bottom =p The lag has nothing to do with the script engine, it's rather due to a bad implementation of the function list which refreshes whenever a key is pressed in the same thread as the user interface. It's been implemented like this since I added the feature god knows how long ago, but I haven't gotten around to fixing it yet. A fix should however arrive in the next version or the one after that. On a side-note though... It's technically better to divide up your code into multiple files if it gets up to that kind of sizes, simply because the modularity, it'll be a lot easier to find things in your code because you can structure the division of the code along the different files efficiently. Quote Link to comment Share on other sites More sharing options...
Wanted Posted January 15, 2012 Share Posted January 15, 2012 Yea there's a limit in terms of you can only scroll over the right a certain amount. I've never had this problem and have even exploited it by shoving all the FormInfo on one line before lol. Quote Link to comment Share on other sites More sharing options...
shadowrecon Posted January 16, 2012 Share Posted January 16, 2012 Yea there's a limit in terms of you can only scroll over the right a certain amount. I've never had this problem and have even exploited it by shoving all the FormInfo on one line before lol. I may have to give that a try, would save alot of space, just be a headache if you ever needed to change something, so i guess make sures its right first =) ---------- Post added at 04:52 AM ---------- Previous post was at 04:49 AM ---------- The lag has nothing to do with the script engine, it's rather due to a bad implementation of the function list which refreshes whenever a key is pressed in the same thread as the user interface. It's been implemented like this since I added the feature god knows how long ago, but I haven't gotten around to fixing it yet. A fix should however arrive in the next version or the one after that. On a side-note though... It's technically better to divide up your code into multiple files if it gets up to that kind of sizes, simply because the modularity, it'll be a lot easier to find things in your code because you can structure the division of the code along the different files efficiently. oh okay, how would you go about making a separate functions list, i would assume just make another scar file with all the functions in it pretty simple but how would you call the into your script, can your function list be located within you script folder and call it from there somehow? or does it have to be within in the includes folder? Quote Link to comment Share on other sites More sharing options...
FHannes Posted January 16, 2012 Share Posted January 16, 2012 Yea there's a limit in terms of you can only scroll over the right a certain amount. I've never had this problem and have even exploited it by shoving all the FormInfo on one line before lol. This is a limit imposed in most if not all code editors actually. oh okay, how would you go about making a separate functions list, i would assume just make another scar file with all the functions in it pretty simple but how would you call the into your script, can your function list be located within you script folder and call it from there somehow? or does it have to be within in the includes folder? You just create include files, there's no rule stating include files can't be used to break up a script into multiple pieces. The convenient thing about SCAR's new include system is that it's very flexible. You can just place the files in the same folder as your script and include them like {$I ScriptFunctions.scar}, or in a subfolder of the folder where your script is located: {$I SubFolder\ScriptFunctions.scar}. SCAR's include system will go looking for an include file relative to the current include file first, then relative to the script path and then relative to the includes folder. Quote Link to comment Share on other sites More sharing options...
shadowrecon Posted January 19, 2012 Share Posted January 19, 2012 This is a limit imposed in most if not all code editors actually. You just create include files, there's no rule stating include files can't be used to break up a script into multiple pieces. The convenient thing about SCAR's new include system is that it's very flexible. You can just place the files in the same folder as your script and include them like {$I ScriptFunctions.scar}, or in a subfolder of the folder where your script is located: {$I SubFolder\ScriptFunctions.scar}. SCAR's include system will go looking for an include file relative to the current include file first, then relative to the script path and then relative to the includes folder. That makes since, that is pretty awesome because that means you dont need to have an include with scar u can just make your own include and stick it in the scripts folder, i will be using this more often, as this would deff make scripts more readable when using forms as they could be placed in separate file and then just call the start form procedure form that file =) Quote Link to comment Share on other sites More sharing options...