Why does I:=1 to 99 give me 'Identifier expected' and how can I make it so that I := 1, 2, 3, 4, 5, 6, bah bah bah , 99?
I do not want to use a 'For I = 1 to 99 do' line.
Why does I:=1 to 99 give me 'Identifier expected' and how can I make it so that I := 1, 2, 3, 4, 5, 6, bah bah bah , 99?
I do not want to use a 'For I = 1 to 99 do' line.
Active only during the Summer...
Edit:
Sorry saw first post:
SCAR Code:repeat
i:=i+1
until(i=99);
Now It's right.![]()
Formerly known as Cut em2 it
Hey thanks you completely did not answer my question!
I'm trying to make it so that I = everything between 1 and 99. Not 1 or 2 or 3 or 4 or 5 or blah. I'm looking for a way so that it equals 1 and 2 and 3 and 4 and 5 and blah.
P.S.
You missed a semicolon on line 2.
Active only during the Summer...
Can you clarify your question some more?
Like an example of why you need this/ what your using it for?
Returns me an error (Identifier).SCAR Code:3:begin
if FindChatText('c lvl')then
begin
SayCurrentLevels('Runecraft');
Typesend('yours?');
I := 1 to 99;
repeat
wait(50+random(50));
Players[CurrentPlayer].Integers[2] := Players[CurrentPlayer].Integers[2] - 1;
until FindChatText(inttostr(I)) or (Players[CurrentPlayer].Integers[2] = 0);
end;
end;
I'm trying to make it so that I has multiple meanings. No sequence to it, I could make it so that it repeats until 'true,' but this got me curious.
Not 1 2 3 4 5 6 7 8 9 10, not so that it is achieved by randoms, but so that it is every number between 1 and 99.
SCAR Code:I := 1 2 3 4 5 8 7 9 6 10 15 25.
I guess I could do
or something to this effect as well, but this has nothing to do with it either.SCAR Code:a
for I:=1 to 99 do
if found=false
I:= 99 downto 1
if found = false
goto a
Does this explain what I'm asking or have I confused you some more?
BAAHH THEY ALWAYS LEAVE! CMON GUYS! BEING LAZY ONLY ANSWERING DUMB QUESTIONS.
Active only during the Summer...
Umm, don't you need to declare I as a variable?
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 |
SCAR Code:3:begin
if FindChatText('c lvl')then
begin
SayCurrentLevels('Runecraft');
Typesend('yours?');
for I := 1 to 99 do
begin
wait(50+random(50));
Players[CurrentPlayer].Integers[2] := Players[CurrentPlayer].Integers[2] - 1;
if FindChatText(inttostr(I)) or (Players[CurrentPlayer].Integers[2] = 0) then
Break;
end;
end;
end;
[CENTER][img]http://signatures.mylivesignature.com/54486/113/4539C8FAAF3EAB109A3CC1811EF0941B.png[/img][/CENTER]
[CENTER][BANANA]TSN ~ Vacation! ~ says :I Love Santy[/BANANA][/CENTER]
[CENTER][BANANA]Raymond - Oh rilie? says :Your smart[/BANANA][/CENTER]
No, it goes in a sequence.
Is it that hard to understand? Yes I know that this will work, good.
I'm not asking for a method of finding some crazy string, I'm asking is SCAR or any language at that capable of making it so that some variable is between two integers (greater than 0 and less than 100). And if so in SCAR, how would you write it?
Active only during the Summer...
No you can't do that..
I'd just do something like this:
But idk, I don't really know what it's for so..SCAR Code:while not FindChatText(inttostr(I)) do
begin
Inc(i);
if (i >= 99) then i := 1;
Players[CurrentPlayer].Integers[2] := Players[CurrentPlayer].Integers[2] - 1;
if (Players[CurrentPlayer].Integers[2] = 0) then Break;
end;
EDIT: lol Santa beat me to it![]()
OK, thanks =/ Too bad.
What this does is it takes the predefined variable (Players.Integers[2]) which in the script I am writing has a default of 50, which goes up every 'load' and goes down every .050 secs if someone asks your rc level. I wanted I to have 99 different values, which I did not think was possible, but got curious so I figured I'd ask.
Boiled down, an autoresponder.
Active only during the Summer...
Oh I see..
Well really you only need to search for the digits 0-9.. Since any number 1-99 will have those.. Then find what lvl they say (if that's what you want to find).
I'm sure you could make a function like this pretty easily.
If you want more help on it I'm willing to help![]()
Yeah, I thought of this too because I knew that it could* think a number is three different things (really two, the 'outliers') depending on whether it's on the downto or to...so now I'm looking at bitmaps. Hmm I may just trash this idea completely, although I want my script to be a considerate little cheater.
Ex.
98 contains
98
9
8
Active only during the Summer...
Yes and then there's always if the player has numbers in their name it might mess everything
up..
EDIT: I'd do something like this idk..
SCAR Code:Function PlayerSaysLevel: Boolean;
var
i : Integer;
chat : string;
begin
repeat
for i := 0 to 9 do
begin
GetLastChatText(chat);
if (Pos(chat, IntToStr(i)) <> 0) then
begin
Result := True;
Exit;
end;
end;
until (Players[CurrentPlayer].Integers[2] = 0)
end;
I have not thought of this...Hmm...
FindChatText I think is the one that grabs the last line of text...It may have coordinates that do not include the name.
Edit:Actually, I take that back. The name and the text are different colors. The username should not be included.
That looks like it would work, but you never subtract from the integer used as a fail-safe.
Active only during the Summer...
You could use an array of the numbers as a string
and then and then use something like if PosArray <> 0 then blah. I don't have all the details right now, look up some autoresponders, you might find one that does what I said. InChat will get messed up by players names but if you use a function like GetTextAtEx it can work.SCAR Code:I := ['0','1','2','3','4','5','6','7','8','9'];
There are currently 1 users browsing this thread. (0 members and 1 guests)