I have a problem with a piece of code that handles the buying of weapons for your mafia.
verb Weapon_Shop() input("Welcome to Bulletnation. You have $[Money], [Htmen] hitmen, and [Sniper] snipers. What would you like to buy?") in list("9mm Glock $100","SOCOM Pistol $500","MP5 $850","XM8 Assault Rifle $1250","AK-47 $1450","Spas-12 Shotgun $1600","Beurrila M1 Twin-Barrel Shotgun $1750","FM Minimi Chaingun $4500","XM8714 Minigun $7000","Killer-Seven Sniper Rifle $6650","Payne-Killer Rocket Launcher $6650","Inferno Rage Flamethrower $15000","Leave") var/bulk = input("How many to you wanna buy?") as num if("9mm Glock $100") if(Money > 100*bulk) Money -= 100*bulk Glock += bulk Gangpower +=1 else usr << "You can't afford this!" return if("SOCOM Pistol $500") if(Money > 500*bulk) Money -= 500*bulk Pistol += bulk Gangpower +=2 else usr << "You can't afford this!" return if("MP5 $850") if(Money > 850*bulk) Money -= 850*bulk MP5 += bulk Gangpower +=4 else usr << "You can't afford this!" return
Notice the returns at the ends of the weapons. THOSE are the problem. Because of them, no matter what weapon I buy PERIOD it always buys the first weapon in the list:the 9mm Glock Handgun. If I remove them, which I have tried and tested, then when I buy any weapon, it buys ALL of them, meaning I get spammed with "You can't buy this" messages.
At first I found this funny, but after trying to fix it for a week now, I went here asking for help. I'm actually a noobish coder trying to make his first game, so any help would be really great.