I made an inline function that takes handles(first pointer, offset 1, offset 2)
it was like 2 lines and it worked perfectly. But I descided to make a function that can handle up to five levels(all though not really practical or necessary for crossfire, it was kind of just for the lolz) and bamn....here is where it gets ugly... it didn't work. So I was like "hmmz I'll fix this and be done in a sec." I know what your thinking, but it gets worse. Thirty seconds or so had passed and I still hadn't spotted the problem.

failure = obsession. Now I need to figure out what's wrong with that snippet asap

Anyway if any of you guys spot the problem let me know please.
source:

Code:
typedef unsigned long DWORD;

void easyPoint(int levels, DWORD firstAdress, DWORD value, DWORD = 0, DWORD = 0, DWORD = 0, DWORD = 0, DWORD = 0); \\prototype

void easyPoint(int levels, DWORD firstAdress, DWORD value, DWORD a, DWORD b, DWORD c, DWORD d, DWORD e)
{
	DWORD offsets[5] = {a, b, c, d, e};
	DWORD final;
	DWORD * temp = &final; // A variable with a lower scope and the same name hides the variable of the higher scope and since, so I wasn't sure if I could use firstAdress rather than making a new variable and I obviously can't check because it doesn't work;

	firstAdress = *(DWORD*)firstAdress;

	for(int i = 0; i < levels; i++)
	{
		firstAdress = *(DWORD*)(firstAdress + offsets[i]); // Translation: Aderess + offset = pointer. Value of pointer = next adress.
		*temp = firstAdress; // My compiler supports the rather new ANSI standard of loops having their own local scope, so I have to that to write to the value outside of the loop
	}
	*(DWORD*)final = value;
}