Help with function?
gpeddino
Member Posts: 51
Can someone help me with this? I'm trying to create a function that will retrieve a specific parameter in the ItemPropertyLight of a staff. I keep getting "ERROR: NOT ALL CONTROL PATHS RETURN A VALUE". What am I not seeing here?
int GetStaffLight (object oStaff) { /// Find the ItemPropertyLight in the staff: itemproperty ipLight = GetFirstItemProperty(oStaff); while (GetIsItemPropertyValid(ipLight)) { if (GetItemPropertyType(ipLight) == ITEM_PROPERTY_LIGHT) { /// Get the "brightness" parameter of the ItemPropertyLight. return GetItemPropertyCostTableValue(ipLight); } ipLight = GetNextItemProperty(oStaff); } }
0
Comments