Methods and variables
#1

My simple question is: What is the difference between methods and variables? Also, what is a value? Please elaborate each example/definition you may give me.

As a reward, you will be given a reputation point.
Reply
#2

Alright, let's start with the beginning.
If you want to store data for as long as the script is running, you can use variables. A variable is just simply something that holds a value. A value can be, for example, 5. So, if I would have variable 'Coins', and the value of 'Coins' is 5, the variable 'Coins' is worth 5.
And, I'm not sure what you mean with method, but what I know under method, is the way you do something.
Reply
#3

Thank you so much. You have just been rewarded for that answer.
Reply
#4

Pawn is a language that doesn't use classes and therefor it has no methods. A method is basically a function within a class.
Reply
#5

Quote:
Originally Posted by Vince
Посмотреть сообщение
Pawn is a language that doesn't use classes and therefor it has no methods. A method is basically a function within a class.
I have been told that I should learn what a method is. James, a very good friend of mine, is teaching me to script.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)