android
  #21  
Old 08-04-2010, 05:13 AM
Shackles Shackles is offline
Junior Member
 
Join Date: Jul 2010
Posts: 16
Default

The google one. Thanks!
Reply With Quote

Advertisement [Remove Advertisement]

  #22  
Old 08-04-2010, 05:46 AM
Habhome's Avatar
Habhome Habhome is offline
Moderator
 
Join Date: Jan 2010
Location: Sweden
Posts: 1,079
Default

Aha, that's Bzdbbb's old site. It was replaced with www.xeroo.net pretty quick. At the moment it is abandoned for all I know and will not be updated. Bzdbbb was, last time I heard, working on a X-Fi2 IDE called Koi Pond. Not sure how that is progressing though but he hasn't been around much lately despite being a mod here, so my guess is he is busy with something important.
There is the LUA wiki by thievingSix for learning the possible commands you can use, so as long as you know some basic programming you can begin from there. Also if you have some specific question you can search the forum and see if somebody have asked about it already, if not you can make a thread about it and ask. Hope that helps.
__________________
"If you are good enough at English to apologize, then there is no need to." - A good friend of mine
Discovered something about the X-Fi2 you think others may not know? Post it here so others can learn about it!
Have a question about X-Fi2 apps? Consult the FAQ before creating a thread about it.
Like my work? Tell your friends. Don't like it? Tell me so I can improve. ^.^
Reply With Quote

  #23  
Old 08-04-2010, 07:20 PM
Shackles Shackles is offline
Junior Member
 
Join Date: Jul 2010
Posts: 16
Default

I heard about xeroo.net, but there is sadly only a application installing guide.
I have also heard about thievingSix's LUA wiki, its of great use!
However, do you know an app which have a simply load function so i can get a basic idea of how it works? I have read through the forums and i can't find any1 who have the same problem as I. Also the wiki is'nt of much help here.
Reply With Quote

  #24  
Old 08-05-2010, 04:07 AM
Habhome's Avatar
Habhome Habhome is offline
Moderator
 
Join Date: Jan 2010
Location: Sweden
Posts: 1,079
Default

Quote:
Originally Posted by Shackles View Post
I heard about xeroo.net, but there is sadly only a application installing guide.
I have also heard about thievingSix's LUA wiki, its of great use!
However, do you know an app which have a simply load function so i can get a basic idea of how it works? I have read through the forums and i can't find any1 who have the same problem as I. Also the wiki is'nt of much help here.
Ah I see. So far noone have had time or determination to make a tutorial for anything. I think mostly because the people who actually stick to programming apps learn by asking those questions they need help with, or by looking at other peoples solutions.
Load functions can be found in: BlackJack, ParadiseSlots, Solitaire, among others.
I think you could learn a lot from BlackJack since I have carefully commented most important lines. Although the code is a bit messy and in need of cleanup some day.

Anyway, below is how I read in a save in the form of two numbers and one string. (It requires a .lua file you store the info in, preferably named save or similar. I kept it in a folder called save also to keep people from accidentally messing with it)

Code:
--Read game save and settings
sSave = io.open("save/save.lua")	--Open stats file in read mode(default)
if (sSave ~= nil) then	--if it isn't empty
	input = sSave:read("*l")	--read the first line
	if (input ~= nil) then	--if input isn't empty
		cash = tonumber(input)	--convert input into a number and save as cash
	end
	input = sSave:read("*l")	--read the next line
	if (input ~= nil) then	--if input isn't empty
		sound = tonumber(input)	--convert input into a number and save in sound
	end
	input = sSave:read("*l")	--read the next line
	if (input ~= nil) then	--if input isn't empty
		currentSkin = input	--Set currentSkin to the string on the line
	end
	sSave:close()	--close file
end
Code:
--Saves your game when called
function saveStats()	
	sSave = io.open("save/save.lua","w")	--Open stats file in write mode
	if (sSave ~= nil) then	--if it isn't empty
		sSave:write(cash,"\n")	--write cash amount into it
		sSave:write(sound,"\n")	--write sound setting
		sSave:write(currentSkin,"\n")	--write skin setting
		sSave:close()	--close file
	end
end
__________________
"If you are good enough at English to apologize, then there is no need to." - A good friend of mine
Discovered something about the X-Fi2 you think others may not know? Post it here so others can learn about it!
Have a question about X-Fi2 apps? Consult the FAQ before creating a thread about it.
Like my work? Tell your friends. Don't like it? Tell me so I can improve. ^.^
Reply With Quote

  #25  
Old 08-06-2010, 04:22 AM
Shackles Shackles is offline
Junior Member
 
Join Date: Jul 2010
Posts: 16
Default

Thank you! Taking a look at it now
Reply With Quote

  #26  
Old 08-06-2010, 11:20 AM
Brett_val's Avatar
Brett_val Brett_val is offline
Senior Member
 
Join Date: Jan 2010
Location: The Netherlands
Posts: 636
Default

I find it easier to have the save/stats file in this format:
Code:
highscore=0
cash=0
sounds=0
That way, you can load it by just doing dofile("save.lua"). That will read the file and execute the commands in it.

You just have to save the stats carefully, like this:
Code:
sSave:write("highscore=",highscore,"\n","cash=",cash,"\n","sounds=",sounds)
Reply With Quote

  #27  
Old 08-06-2010, 02:27 PM
Habhome's Avatar
Habhome Habhome is offline
Moderator
 
Join Date: Jan 2010
Location: Sweden
Posts: 1,079
Default

Quote:
Originally Posted by Brett_val View Post
I find it easier to have the save/stats file in this format:
Code:
highscore=0
cash=0
sounds=0
That way, you can load it by just doing dofile("save.lua"). That will read the file and execute the commands in it.

You just have to save the stats carefully, like this:
Code:
sSave:write("highscore=",highscore,"\n","cash=",cash,"\n","sounds=",sounds)
That's another way, which I'm seriously considering for my newest creation. I think it may be easier to use.
__________________
"If you are good enough at English to apologize, then there is no need to." - A good friend of mine
Discovered something about the X-Fi2 you think others may not know? Post it here so others can learn about it!
Have a question about X-Fi2 apps? Consult the FAQ before creating a thread about it.
Like my work? Tell your friends. Don't like it? Tell me so I can improve. ^.^
Reply With Quote

Reply

Tags
apps, creative, tutorials, x-fi2, zen

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

Forum Jump



All times are GMT -5. The time now is 08:28 AM.