Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

Procedure random() error.

LegyPlegyLegyPlegy Posts: 5Member
I get this weird "parse error before ':=' " error on both line 64 & 75, and I have tried alot of different things but I cant fix it for some odd reason. Here's the code:
[code]
Procedure UserRoll; {Calculates the user's damage.}
begin
init;
enmyhp := 500;
randomize;
userrange := str + wpnstr * 2
random(userrange) := userdmg; {Line64}
userdmg := userdmg - enmydef;
enmyhp := enmyhp - userdmg;
end;

Procedure EnmyRoll; {Calculates the cpu's damage.}
begin
init;
userhp := 500;
randomize;
enmyrange := enmystr + enmywpnstr * 2;
random(enmyrange) := enmydmg; {Line75}
enmydmg := enmydmg - def;
userhp := userhp - enmydmg;
end;
[/code]

Its a procedure for the computer to generate a random number based on given variables. Thanks.

Comments

Sign In or Register to comment.