Procedure random() error. - Programmers Heaven

Howdy, Stranger!

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


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:
Procedure UserRoll; {Calculates the user's damage.}
enmyhp := 500;
userrange := str + wpnstr * 2
random(userrange) := userdmg; {Line64}
userdmg := userdmg - enmydef;
enmyhp := enmyhp - userdmg;

Procedure EnmyRoll; {Calculates the cpu's damage.}
userhp := 500;
enmyrange := enmystr + enmywpnstr * 2;
random(enmyrange) := enmydmg; {Line75}
enmydmg := enmydmg - def;
userhp := userhp - enmydmg;

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


Sign In or Register to comment.