Here you see, is my wizard class shop coding, im having a problem, ive tried to fix it but i cant when your the wizard class it will not let you shop in your basic weapons(below) can someone look through and see if anything is wrong?
//Create the item list for wizards
if (Class == "Wizard"||Class=="Spellsword")
ItemName += "Oak Staff"
ItemName += "Metal Staff"
ItemName += "Magic Staff"
ItemName += "Staff of Knowledge"
ItemName += "Staff of Wisdom"
ItemRef += /obj/equipment/Weapons/Staff/Stf1
ItemRef += /obj/equipment/Weapons/Staff/Stf2
ItemRef += /obj/equipment/Weapons/Staff/Magic_Staff
ItemRef += /obj/equipment/Weapons/Staff/Staff_of_Knowledge
ItemRef += /obj/equipment/Weapons/Staff/Staff_of_Wisdom
//Set the cost of the items
for (var/A=1; A <= length(ItemName);A++)
ItemCost += 10 * (length(ItemName) ** A)
WeaponList += "[ItemName[A]] - [num2text(ItemCost[A], 50)]"
// src wants to buy, so find the item
for (var/I=1; I <= length(ItemName);I++)
// we found the item, now let's create it
if (BuyItem == "[ItemName[I]] - [ItemCost[I]]")
var/BuyChoice=alert("This item costs [ItemCost[I]]. Are you sure you want it?", "Item Shop", "Yes", "No")
if (BuyChoice == "No")
return
else if (Gold < ItemCost[I])
src << "You're short on gold!"
return
src << "You bought \a [ItemName[I]]"
src.Gold -= ItemCost[I]
var/obj/O=ItemRef[I]
new O (src)
Copyright © 2025 BYOND Software.
All rights reserved.
Also- what's going wrong with you?
Care to give us an error readout? Or does it just not work?
And if so, what is it *meant* to do, and what *does* it do?