Page 1 of 1

error in functions.lua

Posted: Tue Jun 22, 2010 5:47 pm
by smokyru
.../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)

Re: error in functions.lua

Posted: Tue Jun 22, 2010 6:16 pm
by Administrator
rom/update.lua