Previous Thread
Next Thread
Print Thread
Rate Thread
#101390 10/03/2000 5:51 PM
Joined: Aug 2000
Posts: 12
Member
Member
Offline
Joined: Aug 2000
Posts: 12
Is there a way to make to variables, and when they are defined, they can be used in a formula.

EX: I'm running an RPG UBB. I want to take the user's post count and rank (if I make their rank definable in the profile screen via drop-down list) and want to use the formula:
Code
code:
(where $HitP is Hit Points (I want to make a variable for that) $Posts is there post count (DUH) and $HitPRank is the value for the rank they chose.

So if my total posts equaled 2 and the rank I chose had a HitPoint value of 3, the formula would be (with the numbers plugged in)
Code
code:
My hit points would be 34 (I'd like it to round off, if possible.

Is math like this doable in PERL, and if so, what are the commands. Thanks for listening to my ramble and I hope for good answers.

Sponsored Links
Entire Thread
Subject Posted By Posted
Math in PERL PolarBlast 10/04/2000 12:51 AM
Re: Math in PERL The Team 10/04/2000 2:12 AM
Re: Math in PERL PolarBlast 10/04/2000 2:27 AM
Re: Math in PERL Mark Badolato 10/04/2000 2:32 AM
Re: Math in PERL PolarBlast 10/04/2000 2:46 AM
Re: Math in PERL Dave_L 10/05/2000 4:00 PM
Re: Math in PERL PolarBlast 10/05/2000 10:37 PM
Re: Math in PERL Dave_L 10/06/2000 12:52 AM
Re: Math in PERL The Team 10/06/2000 3:59 AM

Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Shock Hosting
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
Nettomo
Nettomo
Germany, Bremen
Posts: 417
Joined: November 2001
Forum Statistics
Forums63
Topics37,583
Posts293,955
Members13,825
Most Online151,614
Nov 14th, 2025
Today's Statistics
Currently Online 29723
Topics Created 0
Posts Made 0
Users Online 1
Birthdays 3
Top Posters
AllenAyres 21,080
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,834
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2026 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.1.0
(Snapshot build 20260108)