SRL Archive - OSR Help

Can someone give me a hint.


juunhoad

2013-02-27 08:59:30

Right now i'm trying to solve the anti-leech from the 2007 powerminer made by rij95. it has alot more anti-leech than the other scripts, but that's why I want to solve it :)

after fixing some anti-leech I came across this error:
[Error] C:\Simba\Scripts\MinerV3.00[].simba(449:17): Semicolon (';') expected at line 448
Compiling failed.
The line is:
case GemCombo.ITEMINDEX of
and procedure is:

Procedure SetGem;

var
GemCombo: Integer;

begin
case GemCombo.ITEMINDEX of
0:
Begin
GemKeep := 'Sapphire'
End;
1:
Begin
GemKeep := 'Emerald'
End;
2:
Begin
GemKeep := 'Ruby'
End;
3:
Begin
GemKeep := 'Diamond'
End;
4:
Begin
GemKeep := 'None'
End;
End;
End;

I placed the var line by myself, because it said 'Unknown Identifier' for GemCombo.
I really don't know what to fix here. it says that I need to put a ;, but where? I don't see a place where I can put that so I think there is something wrong with the condition.

Can someone give me some hints?
And I already read the http://villavu.com/forum/showthread.php?t=58935 guide
But with the information I get there about cases, isn't enough.

Thanks

xtrapsp

2013-02-27 09:09:59

What's the difference between


procedure WhichSport(Sport: String);
begin
case Lowercase(Sport) of
'hockey':
WriteLn('HOCKEY!');

'soccer':
WriteLn('SOCCER!');

'basketball':
WriteLn('BASKETBALL!');

'baseball':
WriteLn('BASEBALL');

and

begin
case GemCombo.ITEMINDEX of
0:
Begin
GemKeep := 'Sapphire'
End;
1:
Begin
GemKeep := 'Emerald'
End;
2:
Begin
GemKeep := 'Ruby'
End;

juunhoad

2013-02-27 09:45:24

From: xtrapsp
What's the difference between


procedure WhichSport(Sport: String);
begin
case Lowercase(Sport) of
'hockey':
WriteLn('HOCKEY!');

'soccer':
WriteLn('SOCCER!');

'basketball':
WriteLn('BASKETBALL!');

'baseball':
WriteLn('BASEBALL');

and

begin
case GemCombo.ITEMINDEX of
0:
Begin
GemKeep := 'Sapphire'
End;
1:
Begin
GemKeep := 'Emerald'
End;
2:
Begin
GemKeep := 'Ruby'
End;


Already looked at that, but I think it has something to do with the procedure name.
Do I need to put lowercase in it?
Procedure SetGem(GemCombo: String);
begin
case lowercase(GemCombo.ITEMINDEX) of

Something like this? but still doesn't work.

juunhoad

2013-02-27 11:18:59

wtf I just get mad for not fixing this. Is there a lot wrong in the Procedure or only 1 or 2 things? Keep getting errors when I change something in that Procedure.

Element17

2013-02-27 11:31:04

First this section is not really for fixing someones anti-leech…that is the whole point! If you read some tuts you will find your answer, but xtrapap gave you a pretty good example.

juunhoad

2013-02-27 11:36:03

From: Element17
First this section is not really for fixing someones anti-leech…that is the whole point! If you read some tuts you will find your answer, but xtrapap gave you a pretty good example.


I know, but where should I post it then? And I really can't see the link between those two cases.
He says, what is the differencen between them? But to me everything is different if I look at both cases!
I really don't know what to change and what not to. I have been reading the case explanation in the tutorial(http://villavu.com/forum/showthread.php?t=58935) for 2 hours now and still don't understand..
I have also been looking through some other script and no other script has a case form like he does.