Overkillz Posted August 9, 2022 Share Posted August 9, 2022 (edited) I'm having an issue while using exported functions with receive some parameters Im trying to read the first parameter, but it doesn't work at all, it reads the second one. What do I mean ? -- CLIENT local util = exports["SHI_Util"] function whatever() util.isEmptyString("FIRST_PARAMETER", "SECOND_PARAMENTER") end -- SHARED CLASS function isEmptyString(s) outputChatBox("Recived string: " ..s) end -- RESULT --> Recived string: SECOND_PARAMENTER -- META.XML <meta> <export function="isEmptyString" type="shared"/> </meta> Something similar happens with server side exported functions. I hope you can bring me a hand with this. Thanks in advice, best regards. Edited August 9, 2022 by Overkillz Link to comment
Overkillz Posted August 9, 2022 Author Share Posted August 9, 2022 Well, I've just realized about few things that I wasn't aware about them. First of all, If you store your exported resource which containts your exported functions in a variable, you can't call those functions with: myVariable(dot)functionName -- This doesn't work util.isEmptyString("FIRST_PARAMETER", "SECOND_PARAMENTER") --## RESULT: SECOND_PARAMENTER -- Right way to read parameters util:isEmptyString("FIRST_PARAMETER", "SECOND_PARAMENTER") --## RESULT: FIRST_PARAMETER Thats all, thanks for reading. Link to comment
Moderators Vinyard Posted August 9, 2022 Moderators Share Posted August 9, 2022 Closed on OP's request. Link to comment
Recommended Posts