Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Need to fix my code. Need to fix my code.
Need to fix my code.
Need to fix my code. 10) {print ("YOU SPENT MORE GOLD THAN YOU HAVE!
"); print ("GO BACK AND TRY THAT AGAIN - YOU HAVE 10 GOLD PIECES..
")}elseif ($charType == 'elf') {$healthTokens = $_POST['healthTokens'] + 5;}elseif ($charType == 'wizard') {$expTokens = $_POST['expTokens'] + 2;}elseif ($charType == 'human' || $charType == 'dwarf') {$supplyTokens = $_POST['supplyTokens'] + 10;} $totalGold = 10; $goldLeft = $totalGold - $goldSpent; print("You have created $charName the $charType!
"); print("$charName has $healthTokens health tokens, $expTokens experience tokens, and $supplyTokens supply tokens.
"); print("You received some bonus tokens!:)
"); print("$charName has spent $goldSpent gold pieces, "); print("and has $goldLeft gold pieces left.
"); print("Return to form""); ?>Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started