QJ.NET | Videos | Forums | iPhone | MMORPG | Nintendo DS | Wii | PlayStation 3 | PSP | Xbox 360 | PC | Downloads | Contact Us
Forums | Gaming News | Videos | Downloads | Today's Posts | Mark Forums Read | Chat | FAQ | Members List | Contact

QJ.net Game Discussion - PSP, Xbox, Wii, PS3, PSP Homebrew, and PSP Guides

Go Back   QJ.net Game Discussion - PSP, Xbox, Wii, PS3, PSP Homebrew, and PSP Guides > Developers Corner > PSP Development, Hacks, and Homebrew > PSP Development Forum
The above video goes away if you are a member and logged in, so log in now!

Lua Programming Help Thread

This is a discussion on Lua Programming Help Thread within the PSP Development Forum forums, part of the PSP Development, Hacks, and Homebrew category; sigh, my code was perfect for what you wanted, if you set the directionFlag to 0 in my code then ...

Reply
 
LinkBack Thread Tools
Old 08-12-2009, 05:42 AM   #10171
Developer and Tutor.
 
FaT3oYCG's Avatar
 
My Mood: Happy
Join Date: Jul 2007
Real First Name: Craig
Location: Widnes, England
Just Played: Life.
Posts: 1,646
Trader Feedback: 0
Default

sigh, my code was perfect for what you wanted, if you set the directionFlag to 0 in my code then it stops moving, to fade in and out pictures you would have to use transparency and set the alpha value, i suggest you use pge luaplayer
__________________
------ FaT3oYCG -----
AKA Craig, call me what you want to It's your preference.
My Website: is down for a while ... I'll bring a new one back soon.

Currently working on:
(0) PGE Gears Of War - On hold (Very large project).
(0) PS???? - A tactical 2d side scrolling game involving AI and online multiplayer features. - Tile engine nearley finished (1 bug to fix).
FaT3oYCG is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-12-2009, 08:14 AM   #10172

Developer
 
yaustar's Avatar
 
Join Date: Jun 2006
Location: UK
Posts: 2,317
Trader Feedback: 0
Default

Quote:
Originally Posted by hupengwei View Post
this is mine.i firmly know how to Move,But i want to {STOP},how to stop is the question.
Past any number for MType expect for 1-4.

Quote:
Ps this code moves two fast,and how to slow it down??
Change the speed.
yaustar is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-13-2009, 12:56 AM   #10173
 
Join Date: Jul 2009
Posts: 26
Trader Feedback: 0
Default

Quote:
Past any number for MType expect for 1-4.
en,,,i dont konw what you mean,could speak some easy English???

Quote:
Change the speed.
even change the speed to 1 i think it is still too fast^_^
could we slow it a little more?
hupengwei is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-13-2009, 01:16 AM   #10174
Enter Custom Title
 
dan369's Avatar
 
Join Date: Jan 2008
Real First Name: Dan
Location: Wales, cardiff
Just Played: Overlord 2
Posts: 1,308
Blog Entries: 1
Trader Feedback: 0
Default

Quote:
Originally Posted by hupengwei View Post
en,,,i dont konw what you mean,could speak some easy English???


even change the speed to 1 i think it is still too fast^_^
could we slow it a little more?
Your code is hardcoded but...
Anyway, Mtype has a range from 1-4, you check if Mtype == 1-4. If Mtype isn't in the range of 1-4 then you've 'stopped' whatever you were moving. It doesn't get easier than that.
You can have it as fast/slow as you want it, use a float i.e 0.2345.
dan369 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-14-2009, 06:51 AM   #10175
 
Join Date: Jul 2009
Posts: 26
Trader Feedback: 0
Default

get clear of it...
another problem appears
the lua skipped the command " Message("嘿~跑得了和尚跑不了庙,你们能往 哪里逃?","LiXiaoYao","001"," 李逍遥",false)"
Code:
--┍━━━━━━━━━━━━━━━━━━━━━━━━━━━━┑
--│Windows XP For PSP                                      │ 
--│制作人:胡鹏伟                                           │
--│联系我:QQ:315362463   E—mail:hupengweide@sina.com     │
--┕━━━━━━━━━━━━━━━━━━━━━━━━━━━━┙
--###########################################################
--■ 0000002.lua
-------------------------------------------------------------
--     本部分主要用于储存地图0000002的内容。(罗刹洞口)
--###########################################################
--背景图片
MapBack = Image.load("Pictures/Maps/0000002/Stage0000002.png")
--背景音乐
--可行动区域
--事件位置与内容
 event={}
 event[1]={x=1,y=1,runtype=true,move=false}
 event[2]={x=1,y=1,runtype=false,move=false}
 event[3]={x=1,y=1,runtype=false,move=false}
 event[4]={x=1,y=1,runtype=false,move=false}
function Event(num)
 if num == 1 then
  img1 = Image.load("Pictures/Maps/0000002/Event1.png")
  x=480
  y = 270
  while y>130 do
   screen:blit(0,0,MapBack)
   screen:blit(x,y,img1)
   x=x-2
   y=y-1
   screen.flip()
   screen.waitVblankStart()
  end 
  Message("嘿~跑得了和尚跑不了庙,你们能往哪里逃?","LiXiaoYao","001","李逍遥",false)
  screen:clear()
  screen:blit(0,0,MapBack)
  screen:blit(x,y,img1)
  while y>100 do
   screen:blit(0,0,MapBack)
   screen:blit(x,y,img1)
   x=x-2
   y=y-1
   screen.flip()
   screen.waitVblankStart()
  end 
 end
end
the following is the code of "message":
Code:
 --┍━━━━━━━━━━━━━━━━━━━━━━━━━━━━┑
--│Windows XP For PSP                                      │ 
--│制作人:胡鹏伟                                           │
--│联系我:QQ:315362463   E—mail:hupengweide@sina.com     │
--┕━━━━━━━━━━━━━━━━━━━━━━━━━━━━┙
--###########################################################
--■ Function_Message
-------------------------------------------------------------
--     本部分主要用于显示对话框。
--###########################################################
function Message(text,person,number,name,l_side)
 SaveScreen(0,0,480,272,scr)
 Mback=Image.load("Pictures/System/Message.png")
 Mperson=Image.load("Pictures/Heads/"..person.."/"..number..".png")
 Mname=Image.load("Pictures/System/ShowName.png")
 --定位图片,定位
 local mx =1
 local my =1
 local sx =1
 local sy =1
 if l_side==1 then
  mx=0
  my=152
  sx=97
  sy=210
  nx=97
 else 
  mx=480-Mperson:width()
  my=152
  sx=10
  sy=210
  nx=264
 end
 --处理文字信息
 local lines={}
 lines[1]=string.sub(text,1,46)
 lines[2]=string.sub(text,47,92)
 lines[3]=string.sub(text,93,138)
 while true do
  if pad:circle() then
   break
  end
  screen:clear()
  screen:blit(0,0,scr)
  screen:blit(0,192,Mback)
  screen:blit(mx,my,Mperson)
  screen:blit(nx,160,Mname)
  GbkPrint(nx+30,168,name,yellow)
  GbkPrint(sx,sy,lines[1],white)
  GbkPrint(sx,sy+16,lines[2],white)
  GbkPrint(sx,sy+32,lines[3],white)
  screen.flip()
  screen.waitVblankStart()
 end  
end
function SaveScreen(left,top,width,height,scr)
    scr = scr or screen
    if scr ~= screen then
        tmp_canvas = Image.createEmpty(width,height)
        tmp_canvas:blit(0,0,scr,left,top,width,height)
    else
        screen.flip()
        tmp_canvas = Image.createEmpty(width,height)
        tmp_canvas:blit(0,0,scr,left,top,width,height)
        screen.flip()
    end
end
hupengwei is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-14-2009, 07:29 AM   #10176
 
Join Date: Jul 2009
Posts: 26
Trader Feedback: 0
Default

figured it out myself
hupengwei is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-15-2009, 08:24 PM   #10177
 
Join Date: Jul 2009
Posts: 26
Trader Feedback: 0
Default

a question :
i konw that if i input
Code:
h={}
h[x]={y=125,z=25}
then when i want to use the data 25,i could simply input
Code:
a=h[x][z]
but what should i do to get the value of x if i know that"y=125,z=25" ??
hupengwei is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-15-2009, 09:41 PM   #10178

oh hai thar
 
Da_MerV's Avatar
 
Join Date: Mar 2007
Real First Name: Merv
Posts: 1,128
Blog Entries: 1
Trader Feedback: 0
Default

I don't think I understand your question. Could you please rephrase that?
Da_MerV is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-15-2009, 11:48 PM   #10179
 
Join Date: Jul 2009
Posts: 26
Trader Feedback: 0
Default

i want a function that can output a number x,which makes h[x].y=125,h[x].z=25.
hupengwei is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-16-2009, 01:19 AM   #10180

Developer
 
Nielkie's Avatar
 
Join Date: Jul 2006
Posts: 549
Trader Feedback: 0
Default

It sounds like you're doing something retarded, but hey.

Code:
function youFail(t)
	for k, v in ipairs(t) do
		if v.y == 125 and v.z == 25 then
			return k
		end
	end
end
__________________


Nielkie is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-16-2009, 04:04 AM   #10181
Developer and Tutor.
 
FaT3oYCG's Avatar
 
My Mood: Happy
Join Date: Jul 2007
Real First Name: Craig
Location: Widnes, England
Just Played: Life.
Posts: 1,646
Trader Feedback: 0
Default

Quote:
Originally Posted by Nielkie View Post
It sounds like you're doing something retarded, but hey.
haha you just gotta love Nielkie .
__________________
------ FaT3oYCG -----
AKA Craig, call me what you want to It's your preference.
My Website: is down for a while ... I'll bring a new one back soon.

Currently working on:
(0) PGE Gears Of War - On hold (Very large project).
(0) PS???? - A tactical 2d side scrolling game involving AI and online multiplayer features. - Tile engine nearley finished (1 bug to fix).
FaT3oYCG is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-16-2009, 06:11 PM   #10182
 
Join Date: Jul 2009
Posts: 26
Trader Feedback: 0
Default writing codes is a really confusing thing......

problem happened again!
When i used the comand"ShowStage(4,12,9)" ,i get an message:
can't compare nil with a number
i don`t know why.
i put the following between "local dxmax=MapBack:width()/16
local dymax=MapBack:height()/16" and" if dx<dxmax+1 and dx>0 then
if dy<dymax+1 and dy>0 then".To my surprise ,dx and dy is nil???
writing codes is a really confusing thing......
Code:
 while true do
  screen:clear()
  GbkPrint(0,0,Moveable[9][11],white)
  GbkPrint(0,16,dx..dy,white)
  GbkPrint(0,32,px..py,white)
  screen.flip()
  screen.waitVblankStart()
 end
the following is the codes for ShowStage(direction,px,py )
Code:
function JudgeMove(direction,px,py)
 if dircetion==4 then
  dx=px-1
  dy=py
 end
 if direction==6 then
  dx=px+1
  dy=py
 end
 if direction==8 then
  dx=px
  dy=py-1
 end
 if direction==2 then
  dx=px
  dy=py+1
 end
 local dxmax=MapBack:width()/16
 local dymax=MapBack:height()/16
 --出界判定
  if dx<dxmax+1 and dx>0 then
    if dy<dymax+1 and dy>0 then
 --不可行动区域判定
     if Moveable[dy][dx]==1 then
 --事件阻挡判定
      if MapEvent[dx][dy]~=1 then
	   return true
        end
     end
    end
   end
end
hupengwei is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-17-2009, 02:22 AM   #10183

Developer
 
yaustar's Avatar
 
Join Date: Jun 2006
Location: UK
Posts: 2,317
Trader Feedback: 0
Default

Code:
if dircetion==4 then
Your error is caused by this line. It should be really obvious why if you look carefully and consider the possible reasons for a variable to be nil.
yaustar is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-24-2009, 06:59 PM   #10184
 
cmbeke's Avatar
 
My Mood: Fine
Join Date: Jan 2008
Real First Name: Chris
Location: Iowa
Just Played: Brave Story: New Traveler
Posts: 297
Trader Feedback: 0
Default

can i put a table with in a table? ie
image = {
x = 10,
y = 20,
buffer = {x = 2, y = 3},
}
cmbeke is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-24-2009, 10:58 PM   #10185

Developer
 
Nielkie's Avatar
 
Join Date: Jul 2006
Posts: 549
Trader Feedback: 0
Default

Why don't you try?

Lua code - 9 lines - codepad
__________________


Nielkie is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-31-2009, 08:00 PM   #10186
 
cmbeke's Avatar
 
My Mood: Fine
Join Date: Jan 2008
Real First Name: Chris
Location: Iowa
Just Played: Brave Story: New Traveler
Posts: 297
Trader Feedback: 0
Default 3d in luaplayer

im trying to figure out how the 3d functions in lua player work, so i modifyed the cube demo:
Code:
System.usbDiskModeActivate()

-- Colors
red = Color.new(255, 0, 0) 
orange = Color.new(255, 140, 0)
yellow= Color.new(255, 255, 0)
green = Color.new(0, 255, 0) 
blue = Color.new(0, 0, 255)
blue2 = Color.new(30, 144, 255)
blue3 = Color.new(16, 78, 139)
blue4 = Color.new(25, 25, 112)
purple = Color.new(153, 50, 204)
pink = Color.new(255, 110, 199)
black = Color.new(0, 0, 0)
brown = Color.new(107, 66, 38)
white = Color.new(255, 255, 255)
grey = Color.new(84, 84, 84)
light_grey = Color.new(211, 211, 211)
silver = Color.new(230, 232, 250)

-- Move Values
movX = 0
movY = 0
movZ = -10
extra = 0
-- Rotate Values
rotX = 0
rotY = 0
rotZ = 0

-- Loads Seamless Image To Tile On Cube
logo = Image.createEmpty(64, 64)
logo:clear(silver)
logo:print(5, 8, "Lua", black)
logo:print(10, 17, "3D", black)


require("System\\analog")
require("System\\cube")

while true do
pad = Controls.read()
screen:clear(white)
	analogSet(1,1)
Gu.start3d()
	-- clear screen
		Gu.clearDepth(0);
		Gu.clear(Gu.COLOR_BUFFER_BIT|Gu.DEPTH_BUFFER_BIT)
	-- setup projection and view matrices
		Gum.matrixMode(Gu.PROJECTION)
		Gum.loadIdentity()
	-- perspective length, ratio(15/8.5 is psp screen), how close to screen you can get to object before break point
		Gum.perspective(25, 15/8.5, .5, 10000)
		Gum.matrixMode(Gu.VIEW)
		Gum.loadIdentity()
	-- setup texture
		Gu.enable(Gu.BLEND)
		Gu.enable(Gu.TEXTURE_2D);
		Gu.texImage(logo)
	-- Colors/Textures Object
		Gu.texFunc(Gu.TFX_MODULATE, Gu.TCC_RGBA)
	-- Makes Smooth
		Gu.texEnvColor(white)
		Gu.texFilter(Gu.LINEAR, Gu.LINEAR)
	-- Scale of Texture, large number small texture is, slower fps
		Gu.texScale(.25, .25)
	-- setup matrix for cube
		Gum.matrixMode(Gu.MODEL)
		Gum.loadIdentity()
		Gum.translate(movX, movY, movZ)
		Gum.rotateXYZ(rotX, rotY, rotZ)
	-- draw cube
		Gum.drawArray(Gu.TRIANGLES, Gu.TEXTURE_32BITF|Gu.COLOR_8888|Gu.VERTEX_32BITF|Gu.TRANSFORM_3D, cube[0])
Gu.end3d()
	
	if pad:start() then
		break
	end

	screen.waitVblankStart()
	screen.flip()
end
i want to make a line of cubes so i have the for i=0,3 do thing. I want it so whatever i is you add/subtract it to the x of the cube:
Code:
for i=0,3 do 
cube[i] = {
-- Each 3 part section create a triagnle
	-- unknown,unknown, color, x, y, z
	{0, 0, red, -1+i, -1,  1},  -- 0
	{2, 0, red, -1+i,  1,  1},  -- 4
	{2, 2, red,  1+i,  1,  1},  -- 5

	{0, 0, red, -1+i, -1,  1},  -- 0
	{2, 2, red,  1+i,  1,  1},  -- 5
	{0, 2, red,  1+i, -1,  1},  -- 1

	{0, 0, orange, -1+i, -1, -1},  -- 3
	{2, 0, orange,  1+i, -1, -1},  -- 2
	{2, 2, orange,  1+i,  1, -1},  -- 6

	{0, 0, orange, -1+i, -1, -1},  -- 3
	{2, 2, orange,  1+i,  1, -1},  -- 6
	{0, 2, orange, -1+i,  1, -1},  -- 7

	{0, 0, yellow,  1+i, -1, -1},  -- 0
	{2, 0, yellow,  1+i, -1,  1},  -- 3
	{2, 2, yellow,  1+i,  1,  1},  -- 7

	{0, 0, yellow,  1+i, -1, -1},  -- 0
	{2, 2, yellow,  1+i,  1,  1},  -- 7
	{0, 2, yellow,  1+i,  1, -1},  -- 4

	{0, 0, green, -1+i, -1, -1},  -- 0
	{2, 0, green, -1+i,  1, -1},  -- 3
	{2, 2, green, -1+i,  1,  1},  -- 7

	{0, 0, green, -1+i, -1, -1},  -- 0
	{2, 2, green, -1+i,  1,  1},  -- 7
	{0, 2, green, -1+i, -1,  1},  -- 4

	{0, 0, blue, -1+i,  1, -1},  -- 0
	{2, 0, blue,  1+i,  1, -1},  -- 1
	{2, 2, blue,  1+i,  1,  1},  -- 2

	{0, 0, blue, -1+i,  1, -1},  -- 0
	{2, 2, blue,  1+i,  1,  1},  -- 2
	{0, 2, blue, -1+i,  1,  1},  -- 3

	{0, 0, purple, -1+i, -1, -1},  -- 4
	{2, 0, purple, -1+i, -1,  1},  -- 7
	{2, 2, purple,  1+i, -1,  1},  -- 6

	{0, 0, purple, -1+i, -1, -1},  -- 4
	{2, 2, purple,  1+i, -1,  1},  -- 6
	{0, 2, purple,  1+i, -1, -1},  -- 5
}
end
there is no error code, is there anything that i am doing wrong
cmbeke is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-31-2009, 08:08 PM   #10187
 
cmbeke's Avatar
 
My Mood: Fine
Join Date: Jan 2008
Real First Name: Chris
Location: Iowa
Just Played: Brave Story: New Traveler
Posts: 297
Trader Feedback: 0
Default

what i meam by no error code is that all i get is
Code:
Error: No script file found
press start to restart
cmbeke is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 09-08-2009, 03:19 AM   #10188

Developer
 
yaustar's Avatar
 
Join Date: Jun 2006
Location: UK
Posts: 2,317
Trader Feedback: 0
Default

Quote:
Originally Posted by cmbeke View Post
what i meam by no error code is that all i get is
Code:
Error: No script file found
press start to restart
That's your error. LuaPlayer can't find the script file.
yaustar is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 09-20-2009, 10:47 AM   #10189

 
manaxed's Avatar
 
Join Date: Sep 2009
Real First Name: Manak
Location: Some where
Just Played: PSP
Posts: 58
Trader Feedback: 0
Default

Hey guys, I need some help..

i need to figure out how to download files from a URL Using lua Player, Is there any function of that sort in LuaPlayer?

-Manaxed
manaxed is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 09-20-2009, 11:21 AM   #10190
Developer and Tutor.
 
FaT3oYCG's Avatar
 
My Mood: Happy
Join Date: Jul 2007
Real First Name: Craig
Location: Widnes, England
Just Played: Life.
Posts: 1,646
Trader Feedback: 0
Default

which version by which author?

PGE has a pge.net.getfile() function
__________________
------ FaT3oYCG -----
AKA Craig, call me what you want to It's your preference.
My Website: is down for a while ... I'll bring a new one back soon.

Currently working on:
(0) PGE Gears Of War - On hold (Very large project).
(0) PS???? - A tactical 2d side scrolling game involving AI and online multiplayer features. - Tile engine nearley finished (1 bug to fix).
FaT3oYCG is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 09-21-2009, 05:09 PM   #10191

 
manaxed's Avatar
 
Join Date: Sep 2009
Real First Name: Manak
Location: Some where
Just Played: PSP
Posts: 58
Trader Feedback: 0
Default

Hey guys what's wrong with this code?

myfile = pge.file.open(”info.txt”, PGE_FILE_RDONLY)

i get error message unexpected symbol near 'Ö'.

The rest of my program is...

Spoiler for OPEN:

verdana16 = pge.font.load("verdana.tt f", 16, PGE_RAM)


if not verdana16 then
error("Failed to load font.")
end


if not pge.net.init() then
error("Error on net init.")
end


if not pge.utils.netinit() then
error("Error on net dialog init.")
end


white = pge.gfx.createcolor(255, 255, 255)




while pge.running() do



pge.gfx.startdrawing()


pge.gfx.clearscreen()

verdana16:activate()

if pge.net.isconnected() then
verdana16rintcenter(130 , white, "UPDATING INFORMATION...")
else
verdana16rintcenter(130 , white, "ERROR.. YOU ARE NOT CONNECTED TO WLAN.")
end

pge.gfx.enddrawing()


pge.gfx.swapbuffers()

if pge.net.isconnected() then


pge.net.getfile("http://manaxed.freehostia.com/info.txt", "info.txt")


pge.net.shutdown()


pge.gfx.startdrawing()


pge.gfx.clearscreen()


verdana16:activate()


verdana16rintcenter(130 , white, "Finished UPDATING!")


pge.gfx.enddrawing()


pge.gfx.swapbuffers()
string = " "
i=130
while pge.running() do
while string~=null do

myfile = pge.file.open(”info.txt”, PGE_FILE_RDONLY)
name = pge.file.read(myfile, 15)
fid = pge.file.read(myfile, 5)
pge.gfx.startdrawing()
pge.gfx.clearscreen()
verdana16rintcenter(i, white, name)
i=i+10
pge.gfx.enddrawing()
pge.gfx.swapbuffers()
end
end
while pge.running() do
pge.controls.update()
if pge.controls.pressed(PGE_ CTRL_START) then
if pge.net.isconnected() then
pge.net.getfile("http://dl.qj.net/dl.php?fid="..fid, name..".zip")
else
break
end
end




-Manaxed.
__________________
Enter Signature Here.
manaxed is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 09-21-2009, 11:54 PM   #10192
Enter Custom Title
 
dan369's Avatar
 
Join Date: Jan 2008
Real First Name: Dan
Location: Wales, cardiff
Just Played: Overlord 2
Posts: 1,308
Blog Entries: 1
Trader Feedback: 0
Default

Try:
myfile = pge.file.open(”info.txt”, PGE_FILE_RDONLY+PGE_FILE_ CREATE)
dan369 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 09-22-2009, 02:40 AM   #10193

Developer
 
yaustar's Avatar
 
Join Date: Jun 2006
Location: UK
Posts: 2,317
Trader Feedback: 0
Default

Probably something wrong with the speech marks. ” is not the same as ".
yaustar is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 09-22-2009, 02:51 AM   #10194

 
manaxed's Avatar
 
Join Date: Sep 2009
Real First Name: Manak
Location: Some where
Just Played: PSP
Posts: 58
Trader Feedback: 0
Default

na i got it to work had to retype but now im havin a hard time reading from a text file...
-manaxed
__________________
Enter Signature Here.
manaxed is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 10-17-2009, 10:55 AM   #10195
 
My Mood: Fine
Join Date: Apr 2009
Real First Name: Felix
Location: germany
Just Played: Monster Hunter 2
Posts: 41
Trader Feedback: 0
Default

Can somebody tell me how to write something into a file by using SystemOSK?
I tried this:
Code:
nickname = System.startOSK("","Enter your name")
name = io.open("name.txt","w")
name:write(nickname)
name:close()
but it does not write...
Ollin is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Tags
code , lib , lua , luaplayer , noobs , programming , psp programming , scripting , thread

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off



All times are GMT -8. The time now is 06:36 AM.



Use of this Web site constitutes acceptance of the TERMS & CONDITIONS and PRIVACY POLICY
Copyright © 2009, QJ.NET. All Rights Reserved.
Contact Us