Script: Simple Addition Calculator

Code (put in Create event of an object)

firstno=0
secondno=0

firstno=get_string("Insert the first of the values.","5")
secondno=get_string("Insert the value you want to be added to "+string(firstno)+".","10")

show_message("The result of "+string(firstno)+" + "+string(secondno)+" is "+string(firstno+secondno))

How it works

This is a very simple script. It basically asks the user to input two values, then adds them together and outputs the result.

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License