Go Back   3D Realms Forums > Blogs > Samji
Blogs FAQ Members List Social Groups Calendar Mark Forums Read


Rate this Entry

Loops in DSLua

Submit "Loops in DSLua" to Digg Submit "Loops in DSLua" to del.icio.us Submit "Loops in DSLua" to StumbleUpon Submit "Loops in DSLua" to Google
Posted 02-18-2008 at 04:41 PM by Samji
Updated 02-18-2008 at 04:49 PM by Samji

I have been trying to write programs using loops to run on my Nintendo DS with DSLua.

Here is the first one. It just cycles through some fruit and puts in in a hypothetical basket.
I then want a drink for my efforts ... a nice banana smoothie

BGTopText = Screen.LoadTextBG()
BGBotText = Screen.LoadTextBG()
Screen.Initialize(SCREEN_TOP, BGTopText)
Screen.Initialize(SCREEN_BOTTOM, BGBotText)

fruit = "apple,pear,banana,pineapple"
basket = {}
i = 1
for v in string.gmatch(fruit, "%w+") do
basket[i] = v
i = i + 1

message = basket[3] .. " smoothie?"
BGBotText:PrintXY(5, 12, message)

Now I just have to test it.
Posted in Uncategorized
Views 9097 Comments 0
« Prev     Main     Next »
Total Comments 0



All times are GMT -6. The time now is 02:48 AM.

Page generated in 0.10748601 seconds (100.00% PHP - 0% MySQL) with 24 queries

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.

Website is 1987-2014 Apogee Software, Ltd.
Ideas and messages posted here become property of Apogee Software Ltd.