Log in

View Full Version : [Error] (14747:1): 'BEGIN' expected in script



rotflmfwao
07-03-2007, 11:57 PM
I have a begin, and an end;, and I also have no clue why this is happening lol ^^

{.include SRL/SRL.scar}
{.include SRL/SRL/extended/xDTM.scar}

program BoneCollector;
Begin
var bones:Integer;

Procedure LoadDTMs;
Begin
bones := DTMFromString('78DA63E4656060E062800326203E75F8109 8C' +
'D08C4FF81805114550D08ECDBBA05AE064C0B000956543577 AE5F' +
'4755C309243808A801C9F3A3AAB97CF62C8A1A0079B81073' );
End;

end.

PS: this is for a bone collecting/banking script for the chickens 'cause you know how people leave their bones after eating the chicken ;)


PSS: I used search button and i got this, but it doesn't help because I do have a begin at the beginning of my procedure...

http://www.villavu.com/forum/showthread.php?t=6413

stupedspam
07-04-2007, 12:47 AM
program BoneCollector;
{.include SRL/SRL.scar}
{.include SRL/SRL/extended/xDTM.scar}

//don't need begin for vars or const
var bones:Integer;

Procedure LoadDTMs;
Begin
bones := DTMFromString('78DA63E4656060E062800326203E75F8109 8C' +
'D08C4FF81805114550D08ECDBBA05AE064C0B000956543577 AE5F' +
'4755C309243808A801C9F3A3AAB97CF62C8A1A0079B81073' );
end;

Begin //this is a main loop
SetUpSrl;
LoadDTMs;
end.

Hope this helps :D
~Stupedspam

LordGregGreg
07-04-2007, 01:05 AM
Yeah, your program must have its own begin and end; What you did wrong was you had a method (whithc must have its own begin and end too) but your program itself never had a begin. Every method, function, and program must have their own begin and end.

Stevee
07-04-2007, 04:17 AM
simple way of putting it with that last sentece


Every method, function, and program must have their own begin and end.