November 19

https://github.com/ZILtoid1991/pixelperfectengine/blob/ed93bec15deea042516615e73c57d137a2c1f762/pixelperfectengine/src/pixelperfectengine/scripting/lua.d#L98

Struct LuaVar seems to work for the most part, however, at certain point, the value seems to be reset to zero, or not being passed to the target function.

staticMap!(Unqual,Parameters!Func) params;
int stackCounter = 0;
try {
	foreach_reverse(ref param; params) {
		stackCounter--;
		param = luaGetFromIndex!(typeof(param))(state, stackCounter);
	}
}

My theory is, that if typeof(param) is LuaVar, I'm missing some extra steps I'm not doing. Other types of data seem to get through, or at least according to me poking around with debuggers.