|
#1
|
||||
|
||||
|
I have a couple of questions on file handling. The first is can anyone tell me why I am getting this error:
Quote:
Code:
function collision(file,p,mapmax)
local collisiontable={};
Collisionmap = io.open(file,"r");
if p.lr == "left" then
Collisionmap:seek("set",p.x);
else
Collisionmap:seek("set",p.x+p.maxx);
end
for i=1,28 do
table.insert(collisiontable,{});
collisiontable[#collisiontable].type = Collisionmap:read("*n");
Collisionmap:seek("cur",mapmax);
end
io.close(Collisionmap);
return collisiontable
end
Second question, i am trying to create a temporary file and this works to an extent: Code:
tmpcol = assert(io.tmpfile()) tmpcol:close(); Quote:
Quote:
Does anyone know of a better way to create a temporary file?
__________________
Tools: Playlist Manager , Document to RSS , Notepad++ Instellisense Games/Apps: Asteroids, ZenFrame, Graphing Calculator, Pingus X-Fi2, Boxwars, SkiFree, Jezzball |
|
|
|||
|
|
![]() |
«
Previous Thread
|
Next Thread
»
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
All times are GMT -5. The time now is 06:25 PM.











Linear Mode
