View Full Version: Variables

CheatSync.net Forums > Cheat Device Development > Variables



Title: Variables


Durka Durka Mahn - October 13, 2007 07:46 PM (GMT)
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. :)

Dudek13l - February 18, 2009 04:49 AM (GMT)
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. :)

so u saying
if u use

num = 5

so if u have and address (not real)

setchar(0x145324ba75, num);

that means num is like a replacement of 5


so in cheatdevice what does value mean?

and i didnt get wat static var; meant


Durka Durka Mahn - February 18, 2009 08:47 PM (GMT)
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.

Dudek13l - February 19, 2009 04:43 PM (GMT)
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.

o thanks i get it know




Hosted for free by InvisionFree