• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Lua Mods with some functions name

malkavianz

New Member
Joined
Sep 11, 2008
Messages
61
Reaction score
1
I have two mods that have the same function name:

This as a lib.

Code:
	<lib name="arenapvp-system-lib"><![CDATA[
		domodlib('arenapvp-system-config')
		function getColiseumEventOpenDay()
			for i = 1, #PVP_DAY do	
				if(tostring(PVP_DAY[i]) == os.date("%w")) then
					return true
				end
			end		
			return false
		end
	]]></lib>

And another inside a globalevent in another mod.

When i use the talkaction to call my first event, everything is go. If the event is called by the globalevent the second function in another mod is called.
I can make a function to only be visible to the mod file, or all functions are global and i just need to change the names?

Thanks.
 
Just add the word local before the function you want. But keep in mind that this function must be a function created by you and not a function that the OT System LIb uses because the system will not see it.

For more details: Non-Global Functions
 
Back
Top