Error file.s

Topics regarding Scripting with Reality Factory
Post Reply
John
Posts: 29
Joined: Sun Aug 16, 2009 10:40 pm

Error file.s

Post by John » Mon Sep 07, 2009 11:48 pm

:roll:

hello, I have a concern, which is: How many lines supports RF script?, because I have 1048 lines and I walk more.

a greetin

Jay
RF Dev Team
Posts: 1232
Joined: Fri Jul 08, 2005 1:56 pm
Location: Germany

Re: Error file.s

Post by Jay » Tue Sep 08, 2009 3:29 pm

There is no limit. I have had scripts of 200kb and they still worked. They is, however a small problem:

You cannot have more than a certain number of lines in one order (i think 250 or 500 it was, long time ago since i had that problem)

To solve this problem, you must write sub-orders which doe the work and in the 'main order' you will then call them.

Example:

Code: Select all

SubOrder1[ ()
{
 ///xxx
} ]

SubOrderWithArguments[(arg1,arg2)
{
 //yyyy
}

MainOrder[ ()
{
 SubOrder1();
 SubOrderWithArguments("bla",25);
 SubOrderWithArguments("xyz",26);
} ]
Using sub-orders also keeps writing and error-searching time minimal.
Everyone can see the difficult, but only the wise can see the simple.
-----

User avatar
metal_head
Posts: 1244
Joined: Sat Jan 05, 2008 8:31 pm
Location: Bulgaria,Sofia
Contact:

Re: Error file.s

Post by metal_head » Wed Sep 09, 2009 8:22 pm

Hah, this is what I do with most of my scripts, I didn't know about that limitation, but it just looks better like this. I have one main order that executes all the other orders.

Post Reply