View Full Version : Procedures?
Hey321
11-08-2006, 11:25 AM
Ok, i know this is my second thread :(. But anyways i was wondering if i wanted to use the login procedure from the core file? If it helps the file i want to use is called Login. :spongebob: :confused:
Yakman
11-08-2006, 11:28 AM
write {.include SRL\SRL.scar} at the top of your scritpt and it will include all the files in SRL\Core\
Hey321
11-08-2006, 11:45 AM
Ok, i get that but the problem is how would i use a certain procedure from a .scar file? Now i'm getting duplicate identifier "LOGINPLAYER"
Boreas
11-08-2006, 03:50 PM
Ok you know how when you don't use an include, the script kinda looks like this:
Program new; // maybe intro text here
type //types, if needed
const // constants, if needed
var //variables, if needed
// ------Procedure Section
procedure p1;
begin
//blah blah
end;
procedure p2;
begin
//blah blah
end;
// --------- end Procedure Section
//Main loop
begin
p1;
end.
Well when you include an include like srl by doing {.inclulde srl\srl.scar}, all the procedures and functions in that include are sorta in the procedure section automatically. You don't need to put them in there.
So to use a procedure from SRL, just put {.include srl\srl.scar} near the top, and SetUpSRL; in the main loop. Then just call the procedure normally, as if it was in the procedure section.
Duplicate indentifier probably means that you have a procedure in the procedure section that is already in SRL, loginplayer. Just take it out of the procedure section because it's already in SRL which you included.
Powered by vBulletin® Version 4.2.1 Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.