ok thanks. i figured everything out. someone delete/close this thread. thanks.
ok thanks. i figured everything out. someone delete/close this thread. thanks.
Last edited by ts29; 11-23-2009 at 04:24 AM.
erm, first id like you to replace the script in the first post with:
[scar]Program NewProgram;
var
col, row: integer;
blocks: array[0..11] of array[0..5] of integer;
procedure LoadBoard;
var
color, block: integer;
begin
for row:= 0 to 11 do
begin
for col:= 0 to 5 do
begin
block := -4
color := getColor(114 + (45 * col), 93 + (45 * row));
if(color = 13153372) or (color = 11631112) then // *green square
block := 0;
if(color = 13415959) or (color = 1194342) then // *blue square
block := 1;
if(color = 16570576) or (color = 13009981) then // *blue square w/ waves
block := 2;
if(color = 15002566) or (color = 12356431) then // *green diamond
block := 3;
if(color = 9013348) or (color = 9986738) then // *green circle
block := 4;
if(color = 13405140) or (color = 11756034) then // *blue circle
block := 5;
if(color = 1551445) or (color = 12547269) then // *pentagon
block := 6;
if(color = 6187874) or (color = 12223416) then // *fish
block := -1;
if(color = 6364512) or (color = 9931850) then // *crab
block := -2;
if(color = 8995244) or (color = 9981224) then // *jelly fish
block := -3;
if(block > -4) then
blocks[row][col]:= block;
Writeln(inttostr(row + 1) + ', ' + inttostr(col+1) + ': ' +inttostr(color));
end;
end;
end;
begin
end.[/.scar] <---- WITHOUT THE "."
secondly, (block > -4) ONLY checks if block is greater than -4. if you want to check if it is greater than or equal too, you need (block >= -4)
also, blocks[row][col]:= block;
the brackets are neither multiplying, nor coordinates. they are "arrays", which is pretty complex to explain, especially since its a multi-demesional array(2 arrays in one)
hope i sort of helped![]()
<TViYH> i had a dream about you again awkwardsaw
Malachi 2:3
The ">" sign is a mathematical sign for "Greater Than". "<" being "Less Than".
(block > -4) is checking that the value of block is bigger than -4 (negative four).
The square brackets indicate part of an array. An array is a like a single variable, with many different compartments in it. The value in the square brackets indicating which compartment. So Blocks[Row][Col] would get the value from the array, at the values of Row and Col.
I hope you understand and I didn't just confuse you![]()
Scripts: AIOCurser !, Tea Stall Thiever !, Flax Picker !
Other: Objective Functions, Scarduku
Tutorials: How to create a plugin for Simba, [VB.NET] Using My.Settings, [Photoshop] Basic Abstract Art
Outdated: m!ne v1.00 [STATS]
deleted
Last edited by ts29; 11-23-2009 at 04:25 AM.
Click Here
You'll just need to read the stuff about arrays, the rest is pretty much pointless to you. Unless you wish to enhance your scripting capabilities with pascal (the programming language which most resembles that of SCAR)?
You may contact me with any concerns you have.
Are you a victim of harassment? Please notify me or any other staff member.
| SRL Community Rules | SRL Live Help & Chat | Setting up Simba | F.A.Q's |
There are currently 1 users browsing this thread. (0 members and 1 guests)