Scale()
set src in view(4)
set category = null
if(!usr.isduel) return
if(Control!=usr) return
if(usr.PZ1!=src&&usr.PZ2!=src) return
scale_b = input("Scale?","[name]","[scale_b]") as num
if(scale_b<=0) scale_b = 1
if(scale_b>24) scale_b = 24
if(scale_r!=scale_b) scale_r = scale_b
for(var/client/M) if(M.mob) if(src in M.mob.SeeDuel) M << output({"<br><center><b>[usr.name]</b> has set the Scales of <i>[name]</i> to[scale_b]</b><br><b>Scale:</b><i>[scale_b]</i></center>"}, "chat_duel.output")
Problem description:
So I'm an iconer. Not really a coder. I do have programming experience in other languages but I'm still pretty fresh to the syntax on byond.
The game I helped out on recently had their owner/programmer decide he didn't have the time for the game anymore and passed everything to me. So I'm trying to get things going again and I'm running into an issue here.
This code above is to change a value assigned to a card in the game.
It's ment to ask for the Input from the player from a right-click command. ("Scale"). It takes the input, makes sure it's not less than 1 and not more than 24 then assigns it to 2 scales on the card.
This portion of the code works fine.
For some reason the chat output doesn't seem to work and I cannot for the life of me figure out why. I've been essentially teaching myself by working with the functioning coding.
The coding should result in...
If I were to change the scale of my card named XYZ to 20.
"IceFire2050 has set the Scales of XYZ to 20."
And it should only output that line to players viewing or participating in the game and it's outputted to our duel chat window.
Im basically building this using existing code as a template for now...
For example though...
for(var/mob/M in world) if(usr in M.SeeDuel) M << output({"<br><center><font color=#[font]><b>[name]</b> [emote]</font></center>"}, "chat_duel.output")
This output for a similar command works fine.
Can anyone help? I feel like I'm just overlooking this but I've been working on various things here for hours and I can't seem to pin it down.
you dont have to use all these