# Help with writing scripts!



## TenderloinShadow (Nov 4, 2011)

Hey, I'm a very new developer here, just getting started at stuff. I'm working on an Aroma installer for my inverted gapps package, you may have seen a link. I know how to write the script, I've got the syntax down and everything, but I've been having a very strange problem. Whenever I press "enter" and skip to the next line when coding, it breaks the script. Like I've tried two versions side by side, one where the script has no enter presses, another where it does, and the one that did didn't work but the one that did not worked fine. I know people write scripts where they skip lines between blocks of code, I've opened previously made scripts as part of my learning process. But for some reason when I do this it totally backfires on me.

I use notepad++ for my coding. Any help with this would be really appreciated. I mean, I can just write the script without skipping lines, but it ends up as one giant blob of code and it's very frustrating to search through. I'm sure the answer is really simple and I'll feel stupid for not figuring it out, but please, throw me a bone here.


----------



## con247 (Nov 30, 2011)

I did some extensive Aroma scripting for the Rezound. Some approaching 600-700 lines. Typically that behavior is exhibited when you are missing or have an extra "," in a list. I would be happy to take a look at the aroma script if you would like if you can give me some direction of where to look at the script.


----------



## Goose306 (Sep 12, 2011)

Also as a side note I tend to find gedit works a bit better for writing scripting if your on a PC environment. My .02c

Tapped from my jelly-beaned d2vzw


----------



## TenderloinShadow (Nov 4, 2011)

Thanks for the tip Goose. Con, I'll do one more test on my "hitting enter" theory, and if it causes me grief again I'll PM you the script and let you look at it. The comma thing is something I've thought about, maybe I just didn't catch it. Thanks so much guys.


----------



## TenderloinShadow (Nov 4, 2011)

Just tested it again. Script A, everythings all one line. Script B, I pressed enter ONCE after the first line of code (I made sure I pushed it after the semicolon). That's the only difference between them, everything else is the same. Script A works, Script B doesn't.

I used that GUI Aroma maker to start things off, maybe that has something to do with it? I don't know, it's a really weird thing.


----------



## Goose306 (Sep 12, 2011)

TenderloinShadow said:


> Just tested it again. Script A, everythings all one line. Script B, I pressed enter ONCE after the first line of code (I made sure I pushed it after the semicolon). That's the only difference between them, everything else is the same. Script A works, Script B doesn't.
> 
> I used that GUI Aroma maker to start things off, maybe that has something to do with it? I don't know, it's a really weird thing.


How are you saving? Are you saving under the unix/linux option? When I save edify scripts (I assume Aroma scripting is the same) use Character Encoding as Unicode (UTF-8) and Line Ending Unix/Linux. This is in gedit, although I know Notepad++ has similar options.


----------



## yarly (Jun 22, 2011)

Sublime text editor: http://www.sublimetext.com/


----------



## BMc08GT (Jun 23, 2011)

Goose306 said:


> How are you saving? Are you saving under the unix/linux option? When I save edify scripts (I assume Aroma scripting is the same) use Character Encoding as Unicode (UTF-8) and Line Ending Unix/Linux. This is in gedit, although I know Notepad++ has similar options.


+1 if using n+ it will hidden characters at end of each line (when enter is pressed). follow beans instructions and it will work.

Source: PowerBoost Script


----------



## Goose306 (Sep 12, 2011)

BMc08GT said:


> +1 if using n+ it will hidden characters at end of each line (when enter is pressed). follow *gooses* instructions and it will work.
> 
> Source: PowerBoost Script


Fix'd









Tapped from my jelly-beaned d2vzw


----------



## TenderloinShadow (Nov 4, 2011)

Thanks so much for all the help guys. It's all fixed, and if you like there's a new version of my gapps installer in my thread.









In case you're curious, I was saving it as a windows rather than a unix file. I had a feeling it was something simple like that. lol


----------

