error in functions.lua

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Locked
Message
Author
smokyru
Posts: 31
Joined: Fri Dec 18, 2009 9:02 am

error in functions.lua

#1 Post by smokyru » Tue Jun 22, 2010 5:47 pm

.../functions.lua:596: bad argument #1 to 'char' (number expected, got nil)

Code: Select all

	--- Read the outcome from macro 2
	readsz = "";
	ret = {};
	cnt = 0;
	for i = 0, 254, 1 do
		local byte = memoryReadUByte(getProc(), macro_address + addresses.macro2_offset + i);

		if( byte == 0 ) then -- Break on NULL terminator
			break;
		elseif( byte == 9 ) then -- Use TAB to seperate
			-- Implicit casting
			if( string.find(readsz, "^[%-%+]?%d+%.?%d+$") ) then readsz = tonumber(readsz);  end;
-588			if( string.find(readsz, "^%d+$") ) then readsz = tonumber(readsz);  end;
-589			if( readsz == "true" ) then readsz = true; end;
-590			if( readsz == "false" ) then readsz = false; end;
-591
-592			table.insert(ret, readsz);
-593			cnt = cnt+1;
-594			readsz = "";
-595		else
-596			readsz = readsz .. string.char(byte);
-597		end
-598	end
As i'm really not dev kinda guy, there is nothing much i can do about it; if the part of the code i provided is not enough, tell me!
(SVN Update has been done)

User avatar
Administrator
Site Admin
Posts: 5307
Joined: Sat Jan 05, 2008 4:21 pm

Re: error in functions.lua

#2 Post by Administrator » Tue Jun 22, 2010 6:16 pm

rom/update.lua

Locked

Who is online

Users browsing this forum: Google [Bot] and 42 guests