| QUOTE (Durka Durka Mahn @ Oct 13 2007, 12:46 PM) |
| This is an extremely simple tutorial on how to use variables. Variables are the first step into advanced cheat making. A variable in any coding language is an area of memory that holds a specific value. A variable has a name and a value, and can be used anywhere after defining it. To define a variable, you simply do this: variable = value; For example: num = 1; After defining a variable, you can then use it at any time during your code, like so: num = 1; setchar(0x09B83F60, num); *This is an example, do not try this code, it will most likely crash your game. There is also another way to make a variable without setting the value at first, and is usually used with if statements. It is called a static. To define a static, simply do this: static var; This will set up a memory space named var with the initial value of 0, but will not go back and change it back to 0! Hope this tutorial helps. :) |
| QUOTE (Durka Durka Mahn @ Feb 18 2009, 01:47 PM) |
| Not entirely sure what static does in the Cheat Device script to be honest.. But for value: num = 5; num is the variable, named num. 5 is the value. |