Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - blfngl

Pages: [1]
1
TI-Nspire / Russian Roulette
« on: September 09, 2012, 09:45:42 pm »
A basic russian roulette game :)
Start it with load()
By typing 1 or yes, you will start the game.
By typing 2 or anything besides yes, the mob bosses will kill you :)

2
TI-Nspire / Ti Nspire Minecraft Library!
« on: September 09, 2012, 09:25:28 pm »
Hey all,
Because of boredom, today I present you with a Minecraft item/block library!
Added the tools() command! To access picks, hoes, etc, type the tool name, such as pick. It will then ask you for the material it is made of.

Changes:
Spoiler For Spoiler:
V0.2:Added the tools() command! To access picks, hoes, etc, type the tool name, such as pick. It will then ask you for the material it is made of.

V0.1:Only blocks() is supported right now, but the other functions will be added extremely soon. Tools() has some entries.



http://s1067.photobucket.com/albums/u440/blfngl/?action=view&current=minelib2.png#!oZZ3QQcurrentZZhttp%3A%2F%2Fs1067.photobucket.com%2Falbums%2Fu440%2Fblfngl%2F%3Faction%3Dview%26current%3Dminecraftlib-1.gif

I hope you enjoy!
-Blf :ninja:

3
Lua / Trouble with screen managers?
« on: September 09, 2012, 05:47:24 pm »
Hello,
I keep getting an error when typing:
Screen = class()

Then oclua returns the error:
[string "screen = class()..."]:3: attempt to index global 'Screen' (a nil value)

Any tips?

This is the code:
Code: [Select]
Screen = class()
 
function Screen:init() end
 
function Screen:paint(gc) end
function Screen:timer() end
function Screen:charIn(ch) end
function Screen:arrowKey(key) end
function Screen:escapeKey() end
function Screen:enterKey() end
function Screen:tabKey() end
function Screen:contextMenu() end
function Screen:backtabKey() end
function Screen:backspaceKey() end
function Screen:clearKey() end
function Screen:mouseMove(x, y) end
function Screen:mouseDown(x, y) end
function Screen:mouseUp() end
function Screen:rightMouseDown(x, y) end
function Screen:help() end
 
local Screens = {}
 
function PushScreen(screen)
    table.insert(Screens, screen)
    platform.window:invalidate()
end
 
function PullScreen()
    if #Screens > 0 then
        table.remove(Screens)
        platform.window:invalidate()
    end
end
 
function activeScreen()
    return Screens[#Screens] and Screens[#Screens] or Screen
end
 
-- Link events to ScreenManager
function on.paint(gc)
   for _, screen in pairs(Screens) do
        screen:paint(gc)
    end
end
 
function on.timer()
    for _, screen in pairs(Screens) do
        screen:timer()
    end
end
 
function on.charIn(ch) activeScreen():charIn(ch) end
function on.arrowKey(key) activeScreen():arrowKey(key) end
function on.escapeKey() activeScreen():escapeKey() end
function on.enterKey() activeScreen():enterKey() end
function on.tabKey() activeScreen():tabKey() end
function on.contextMenu() activeScreen():contextMenu() end
function on.backtabKey() activeScreen():backtabKey() end
function on.backspaceKey() activeScreen():backspaceKey() end
function on.clearKey() activeScreen():clearKey() end
function on.mouseDown(x, y) activeScreen():mouseDown(x, y) end
function on.mouseUp() activeScreen():mouseUp() end
function on.mouseMove(x, y) activeScreen():mouseMove(x, y) end
function on.rightMouseDown(x, y) activeScreen():rightMouseDown(x, y) end
function on.help() activeScreen():help() end
 
function on.create() PushScreen(Menu()) end
function on.resize() end

I tried making my own and it didn't work, so then I copied the inspired-lua code but got the same error.

4
General Discussion / Does anyone like jazz?
« on: September 08, 2012, 11:45:13 pm »
Anybody here listen to jazz besides me? Or am I just weird... <_<

5
Introduce Yourself! / Hello!
« on: September 07, 2012, 09:15:58 pm »
Hi everyone,
I am a student at a highschool somewhere in the world and I enjoy programming, sports and omnimaga! I don't really know what to write here so lolkbai.  Oh, and I hate peanuts ;)

Blf :ninja:

Pages: [1]