News : The level of daily SPAM has reached insane proportions, all registrations are now manual. I ask you to send me an e-mail (john (at) murga (dot) org), to confirm that you want me to create an account for you.

Post Reply  Post Thread 
find the murgaLua exe in 0.5 and older
Author Message
Senior Member

Posts: 522
Group: Registered
Joined: Apr 2007
Status: Offline
Reputation: 5
Post: #1
find the murgaLua exe in 0.5 and older

I think I've figured out a way to get the name of the murgaLua executable in versions earlier than 0.6

According to the Lua docs, the arg table is populated by negatives for the murgaLua interpreter and its arguments, with the interpreter being the lowest, so it changes depending on how many arguments you pass to it.

This seems to work in DS Linux, but I haven't tested it elsewhere.

-- find the smallest negative index in the arg table
-- this is the murgaLua interpreter (for 0.5 support)
for i in pairs(arg) do
if not low or i < low then low=i end

02-06-2008 05:12 PM
Find all posts by this user Quote this message in a reply
Post Reply  Post Thread 

Messages In This Thread
find the murgaLua exe in 0.5 and older - mikshaw - 02-06-2008 05:12 PM

View a Printable Version
Send this Thread to a Friend
Subscribe to this Thread | Add Thread to Favorites

Forum Jump: