thomasgrant
PLATINUM Member
Trade Count:
( +1)
Hero Member
 
Karma: 1643
Offline
: Yesterday at 07:04:18 PM
Posts: 3082
Referrals: 21
Activity
RSS Writer and Teacher
|
 |
« Reply #6 on: March 28, 2010, 05:46:54 AM » |
|
Another question on utils. I added some more info to this part of the script.
function number_is(number, name):boolean; {check if the number is red, black ,etc.} begin result:=false; case name of 'Red': if in_array(number,[1,3,5,7,9,12,14,16,18,19,21,23,25,27,30,32,34,36]) then begin result:=True; red_numbers[1]:=elements[w,1]; end; 'Black':if in_array(number,[2,4,6,8,10,11,13,15,17,20,22,24,26,28,29,31,33,35]) then begin result:=True; black_numbers[1]:=elements[w,1]; end; 'Odd': if in_array(number,[1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35]) then begin result:=True; odd_numbers[1]:=elements[w,1]; end; 'Even':if in_array(number,[2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36]) then begin result:=True; even_numbers[1]:=elements[w,1]; end; 'Low': if in_array(number,[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18]) then begin result:=True; low_numbers[1]:=elements[w,1]; end; 'High':if in_array(number,[19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36]) then begin result:=True; high_numbers[1]:=elements[w,1]; end; //here you can add other elements end; end;
red_numbers[1]:=elements[w,1]; Here I have set the array red_numbers[1] to = elements[w,1]; Now, I am not sure this will work if I have it in the utils. I have this in my main script. But would like to have it in utils. Saves on script size. How do I go about doing the above? How would I go about adding this to utils so it will work?
|