ScriptUO

Scripting Resources & Utilities => Stealth Client => Topic started by: Crome969 on June 23, 2014, 11:14:40 PM

Title: [Tutorial] Pascal in Stealth [UPDATED 28.06.2014]
Post by: Crome969 on June 23, 2014, 11:14:40 PM
I guess many people may think about learning scripting in pascal but since there are less samples out how to write scripts and what can stealth actual handle.So i want to start a daily small Tutorial.

If you are good in english grammar (since iam not as non native) write me your corrections via PM and i will correct those parts and add you as Editor into the Credits.

I will lock this topic and make a side thread for actual Questions (http://www.scriptuo.com/index.php?topic=12442.0).

Table of Content :
Title: Re: [Tutorial] Pascal in Stealth
Post by: Crome969 on June 24, 2014, 12:31:23 AM
Title: Re: [Tutorial] Pascal in Stealth
Post by: Crome969 on June 24, 2014, 01:04:42 AM
Title: Re: [Tutorial] Pascal in Stealth
Post by: Crome969 on June 24, 2014, 01:34:03 AM
Title: Re: [Tutorial] Pascal in Stealth
Post by: Crome969 on June 24, 2014, 08:06:56 AM
Title: Re: [Tutorial] Pascal in Stealth
Post by: Crome969 on June 24, 2014, 10:30:55 AM
Title: Re: [Tutorial] Pascal in Stealth
Post by: Crome969 on June 24, 2014, 10:47:46 AM
Title: Re: [Tutorial] Pascal in Stealth
Post by: Crome969 on June 24, 2014, 12:05:01 PM
Title: Re: [Tutorial] Pascal in Stealth
Post by: Crome969 on June 28, 2014, 07:22:36 AM
Title: Re: [Tutorial] Pascal in Stealth
Post by: Crome969 on June 28, 2014, 07:40:42 AM
Comments, Regions and final structure

If you mastered all previous tutorials, this final lesson will be very easy.

In Pascal you have multiple ways in order to sort\comment and structure code.
One of those are regions. Regions are used to mark a specific part of code allowing to show and hide them in order to organize your code.
You may see the spoilers here, regions work similar.A region begins with the keyword {$Region 'Name'} where you replace Name for the title of region and ends with the keyword {Endregion}

You also have multiple ways to comment or outcomment code. The most used is // where you can write comments on the line after the //.

If you want to write multiline comments or outcomment a region of code you can use (* <Comments> *) where <Comments reflect your text\code you dont want to be executed anymore.

Attention : If you outcomment code with regions you must keep sure that the begin and end keyword of regions is outcommented or not being commented. Else you will get issues with your Code.

Thats it, you learned now the very very basics of pascal, able to atleast write a few basic scripts. From now on i will start explaining Stealth related Components.Further Questions can be asked Here (http://www.scriptuo.com/index.php?topic=12442.0).