ID:172944
 
var/test= "Test test testity"
test = input("This is a test input","Test",test) as null|message

This is a possible feature request, but how would I set it towhere the player can hit cancel without deleting the current var's sum? If I was to hit cancle, var/test would be null.. Anyway to use cancle without setting the var to null, and not changing anything to the var if the player hits cancle?
Texter wrote:
var/test= "Test test testity"
test = input("This is a test input","Test",test) as null|message

This is a possible feature request, but how would I set it towhere the player can hit cancel without deleting the current var's sum? If I was to hit cancle, var/test would be null.. Anyway to use cancle without setting the var to null, and not changing anything to the var if the player hits cancle?

As a possible workaround, you could do:

var/test = "Test test testity"
var/temp = test
temp = input("This is a test input","Test",test) as null|message
if(temp)
test = temp
So basically, you want it so that if you do A = null, A will remain what it was, instead of being set to null?

That is really, really stupid.
In response to Garthor
Lets say if someone changed there mind on editing a var, they should just be able to hit cancle and make it towhere nothing happened, no changed or anything.. Or changed there mind in the middle of writeing in the var, if they made a mistake in there typing instead of hitting Ctrl+z to fix things back where they was, the player would just have to hit cancel.

~Think before you type~

~Texter

*EDIT* Also lets say someone writes up in this var for use in a browser, they could write somthing long such as a story or news of events, they hit ok and the var is saved, Now if they say "Hey I need to make a small change to that" and open up the message again, Now if he suddenly changed his mind and hit the cancel button the var's sum would be deleted entirely instead of not having anything done to it.

On another note, Thanks Jon88 that works perfectly.

~Text
In response to Texter
But that doesn't matter, because you're still saying that when you set something to null, you shouldn't be doing anything at all. That's the single most counter-intuitive thing I've ever heard.

But if that's what you want, use this:
            var/M = input("Change to what?") as num|null
N += M?(M-N):(0)