Welcome to the wonderful world of “Needing to Use Pointers”.
Basically what you’ll do is to find the table by name using ‘GetPointerFromName’, with the name being the name of your recipe (Chili or somesuch), that’ll give you a pointer to the table. To use that pointer, you’ll ‘dereference’ it by putting a * in front of it, which means ‘do what I’m asking with the thing pointed at by this pointer, not to the pointer itself’. So if you say ‘*mypointer = 12’, you’re not setting the pointer variable to 12, you’re setting the variable pointed to by the pointer to 12. Hope that’s clearer than mud.
So here’s the sample. Have a float table named ‘Chili’ defined, a string named ‘s_RecipeName’, a float named ‘f_RecipeValue’, an int32 named ‘i_RecipeValueIndex’, and that really fun and scary pointer named ‘tp_TablePointer’ with a pointer type of ‘Float Table’, because that’s what we’re going to ask it to point to.
// set up some variables for this test
s_RecipeName = “Chili”;
i_RecipeValueIndex = 3;
f_RecipeValue = 25.4;
// get a pointer to the recipe table for your recipe
// using the pointer, dereference it and pop a value in the right index
*tp_TablePointer[i_RecipeValueIndex] = f_RecipeValue;
If all goes well (and it did when I test ran it), your ‘Chili’ table should end up containing ‘25.4’ in index 3. As a side note, you really really should check the pointer for NULL before you write something using it. I didn’t do that here, because, well… I’m lazy.