ID:138870
 
Code:
        Cmd1(X)
if(X)
src.Fire1 = "[X]"
else
if(src.Cmd1 == null)
src.Cmd1 = "Left"
winset(src,"Game.Cmd1","image = 'CmdLeft.png'")


Problem description:

Optional Backstory: I have to rewrite Sea Battles to fit the new interface. So I tried this. My issue is that this is not changing the image when I click it. I've tried several variations and I've checked the skin reference. What's wrong here?
You're certain Cmd1 is null?
In response to Robertbanks2 (#1)
mob/var/Cmd1 has no value.
Copy the image to the rsc first:

var/A = fcopy_rsc('CmdLeft.png')
winset(src, "Game.Cmd1", "image=\ref[A]")
In response to ExPixel (#3)
                if(src.Cmd1 == null)
var/A = fcopy_rsc('CmdLeft.png')
src.Cmd1 = "Left"
winset(src,"Game.Cmd1","image = \ref [A]")


Still nada. I'm gonna dig through the procs a bit to see if I've overlooked something.
In response to Lugia319 (#4)
Don't put a space after \ref...remove the spaces in the third param of winset altogether.
In response to ExPixel (#5)
        Cmd1(X)
if(src.Cmd1 == null)
var/A = fcopy_rsc('CmdLeft.png')
src.Cmd1 = "Left"
winset(src,"Game.Cmd1","image=\ref[A]")


Nothing. The Command of the button I am pressing is called Cmd1.

The variable definition is here.

mob
var
Turn // Is the turn going?
Hp // Health
Cmd1 // Command 1


I can't figure out what's going on.

EDIT: I've reduced it to where it should do the image change no matter what. Did not work. I've checked the ID of the button, nothing. I don't get why it doesn't work.
In response to Lugia319 (#6)
Is Cmd1(X) ever being called? Please check with a
world "Cmd1([X]) has been called."

debug output message to be sure.
In response to Green Lime (#7)
Doah! Figured it out. It was coded as a proc. I didn't realize that I had two separate chat boxes. The person never had the verb! Sorry about my stupidity taking up your time :(