setting a standard value
Posted: 2002-12-09 23:26:44
I would like change my script so it imports user rating ALWAYS as 0
This is waht it looks like now:
Any hint on how to do this?
This is waht it looks like now:
I have tried to set Value to as Value := 0 (as well as "0") and played around with fieldRating to no avail.// Rating
LineNr := FindLine('User Rating:', Page, 0);
if LineNr > -1 then
begin
Line := Page.GetString(LineNr + 4);
if Pos('/10', Line) > 0 then
begin
BeginPos := pos('<b>', Line) + 3;
Value := IntToStr(Round(StrToInt(StrGet(Line, BeginPos), 0) + (StrToInt(StrGet(Line, BeginPos + 2), 0) / 10)));
SetField(fieldRating, Value);
end;
end;
Any hint on how to do this?