View Full Version : Error with 'const'
opeth dm
09-24-2007, 04:04 AM
Every script I try to use gives me the error in the file Globals.scar where the const starts.
I don't get what it is trying to make me input.
var
RoadColor, WaterColor, BankColor: Integer;
{ var LampSkill: String;
Description: Set Lamp skill. }
var
LampSkill: string;
{ const MMX1, MMY1, MMX2, MMY2;
Description: MiniMap Edge Points. }
const
MMX1 = 549;
MMY1 = 563;
MMX2 = 577;
MMY2 = 562;
{ const MMCX, MMCY;
Description: MiniMap Centre Point. }
const
MMCX = 643;
MMCY = 84;
{ const MSX1, MSY1, MSX2, MSY2;
Description: Main Screen EdgePoints. }
const
MSX1 = 1;
MSY1 = 1;
MSX2 = 516;
MSY2 = 338;
{ const MSCX, MSCY;
Description: Main Screen Centre Points. }
const
MSCX = 259;
MSCY = 170;
{ const MIX1, MIY1, MIX2, MIY2;
Description: Inventory EdgePoints. }
const
MIX1 = 547;
MIY1 = 202;
MIX2 = 737;
MIY2 = 466;
{ const MICX, MICY;
Description: Inventory Centre Points. }
const
MICX = 642;
MICY = 334;
{ const MCX1, MCY1, MCX2, MCY2;
Description: Chat Screen EdgePoints. }
const
MCX1 = 4;
MCY1 = 342;
MCX2 = 496;
MCY2 = 460;
{ const MCCX, MCCY;
Description: Chat Screen Centre Points. }
const
MCCX = 250;
MCCY = 401;
Any help?
EDIT:
Failed when compiling
Line 31: [Error] (78:1): Duplicate identifier '' in script C:\Program Files\SCAR 3.11\includes\SRL/SRL/Core/Globals.scar
that's the error.
IronTeapot
09-24-2007, 04:05 AM
1. Whats the error it gives you.
2. Whats the 10 lines above the line that you get the error on?
opeth dm
09-24-2007, 04:11 AM
var
RoadColor, WaterColor, BankColor: Integer;
{ var LampSkill: String;
Description: Set Lamp skill. }
var
LampSkill: string;
{ const MMX1, MMY1, MMX2, MMY2;
Description: MiniMap Edge Points. }
That is the first 10 lines above the error mark.
and the error it gives is:
Failed when compiling
Line 31: [Error] (78:1): Duplicate identifier '' in script C:\Program Files\SCAR 3.11\includes\SRL/SRL/Core/Globals.scar
IronTeapot
09-24-2007, 04:16 AM
Humm thats very odd, considering there is no " variable anywhere :S
opeth dm
09-24-2007, 04:18 AM
I've updated to SRL4 and Scar 3.11. :/
Could it be my Global.scar file?
IronTeapot
09-24-2007, 04:19 AM
Did you follow this?
http://www.villavu.com/forum/showthread.php?t=17890?p=222816#post222816
Its the most complete up to date everything. and SCAR 3.12 is the newest version.
opeth dm
09-24-2007, 04:31 AM
I did that now, but I get another error.
Failed when compiling
Line 53: [Error] (15384:54): Unknown identifier 'INTEGER2' in script C:\Users\Mitchell\Desktop\guild miner 1.3.scar
procedure PlayerStats;
var Active: string;
var i: Integer;
begin
writeln('***************************************** *****');
writeln('Name : '+ Players[CurrentPlayer].Name);
writeln('Number : '+ inttostr(CurrentPlayer));
writeln('Mining Level : '+ inttostr(getskilllevel('Mining')))
writeln('Mined : ' + inttostr(players[currentplayer].integer2) + ' coal ores')
writeln('Select Skill : '+ Players[CurrentPlayer].Skill);
writeln('Script has been running for: ' + (timerunning))
writeln('Banked : '+ inttostr(Players[CurrentPlayer].Banked) + ' times.');
if Players[CurrentPlayer].Active=True then Active:='True' else Active:='False';
writeln('Active : '+ Active);
writeln('***************************************** *****');
Method
09-24-2007, 04:56 AM
inttostr(players[currentplayer].integer2) should be inttostr(players[currentplayer].integers[2]). It's an array now.
IronTeapot
09-24-2007, 05:03 AM
There was a tutorial on how to properly set up your player array and what it all means, but i havent been able to find it since i formatted my computer and lost my bookmarks.
EDIT: found it
http://www.villavu.com/forum/showthread.php?t=?t=17157
~alex~
09-24-2007, 06:54 AM
Get Scar 3.12 also.
opeth dm
09-24-2007, 08:11 PM
I keep having problems with the booleans in wizzups essence script, as well as the mmx1, mmx2, etc..also.
is there anything that could do all of this for me?
opeth dm
09-24-2007, 09:22 PM
I have a new problem.
While working Wizzups ess miner, I came across this error.
Procedure DeclarePlayers;
Var
I: Integer;
Begin
HowManyBooleans := '2';
InitPlayerArray;
CurrentPlayer := StartPlayer;
orecolor := 0;
orecolor1 := 0;
orecolor2 := 0;
orecolor3 := 0;
Players[0].Name :='sneakydm';
Players[0].Pass :='';
Players[0].Nick :='kyd';
Players[0].Loc :='Bank';
Players[0].Active:=True;
Players[0].Booleans[0] := True; // Is The Pick Equipped?
Players[0].Booleans[1] := False; // False for brightness Check Once.
Players[0].Strings[0] := ''; // Bank PIN, If any.
Players[1].Name :='sneakydm';
Players[1].Pass :='';
Players[1].Nick :='kyd';
Players[1].Loc :='Bank';
Players[1].Active:=True;
Players[1].Booleans[0] := True; // Is The Pick Equipped?
Players[1].Booleans[1] := False; // False for brightness Check Once.
Players[1].Strings[0] := ''; // Bank PIN, If any.
LoadPlayerArray;
HowManyPlayers := Length(Players);
For I := 0 To HowManyPlayers - 1 Do
SetLength(Players[I].Integers, 3);
Writeln( IntToStr ( HowManyPlayers ) + ' Players' );
End;
The actual error is:
Line 49: [Error] (15813:1): Unknown identifier 'HowManyBooleans' in script C:\Users\Mitchell\Desktop\SRL Essence Miner 1.16.scar
HyperSecret
09-24-2007, 09:47 PM
make sure the script you are using it srl 4 compartible...i think that is your problem...
FBH_PwNeD
09-30-2007, 08:01 PM
download srl 4 that may help
loggerpro3.4.6
11-12-2007, 08:23 AM
Is there any way to get older srl versions? I need in order for a script I would like to use, however I haven't been able to locate one yet :S
Powered by vBulletin® Version 4.2.1 Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.