Hello,
I have a question concerning the creation of a function or a procudure i can call from the programm in order to "lighten" the amount of code written.
I plan to write a programm which chooses by random a certain role for a videogame and load the name of the character as well as the name. (For reference alike a void() function from JAVA)
For this bit I was using the following piece of code.
...
choosenOP.Picture.LoadFromFile('thermite.png'); //choosenOP is a TImage
OP_name.Caption := 'THERMITE'; //OP_name is a TLabel
...
So now I would like to have a little something that can work as a function or a procudure sothat i can "call" a function/procudure of the character's name instead of writing the same piece of code over and over again.
I have therefore looked into functions a little bit and found it quite tricky hence I am not working with any variables here which could deliver a result.
I am looking forward for any answers or tips on the topic. (Please excuse my english
)