Search found 186 matches
- Fri Oct 26, 2012 2:01 am
- Forum: Programming and Security
- Topic: [LUA] Need help with code plz
- Replies: 233
- Views: 68142
Re: [LUA] Need help with code plz
Don't give up so soon. I was just where you are. You will go through a lot of trial and error when programming. Don't overwhelm yourself by trying to make a big project at first, take some time to learn what each function does and experiment with it. You won't learn everything in a short amount of ...
- Fri Oct 26, 2012 12:00 am
- Forum: Programming and Security
- Topic: [LUA] Need help with code plz
- Replies: 233
- Views: 68142
Re: [LUA] Need help with code plz
I give up on this project heres the download http://www.sendspace.com/file/8rc54i I give anyone who wants it permission to edit and call it theirs. Can be used in replace of dice for bored games if you lose the dice, be used to give random weapon/item drops in game, and what ever else you can think ...
- Thu Oct 25, 2012 10:56 pm
- Forum: Programming and Security
- Topic: [LUA] Need help with code plz
- Replies: 233
- Views: 68142
Re: [LUA] Need help with code plz
while true do -- My Second Lua Program -- Author: Dragonxtamer596 red = Color.new(255, 0, 0) function checkcontrols() pad = Controls.read() if pad:start() then choice = math.ceil(math.random(1, 3)) end if choice == 1 then screen.print(200, 100, "1", red) end if choice == 2 then screen.print(200, 10...
- Thu Oct 25, 2012 9:37 pm
- Forum: Programming and Security
- Topic: [LUA] Need help with code plz
- Replies: 233
- Views: 68142
Re: [LUA] Need help with code plz
New code, will this work? Can you explain a few code lines to me? screen.flip() while true do......i know its a loop but does it do anything else? screen.waitVblankStart() drawall() and break.............it goes to the bottom of code but does it do anything else? Is the function checkcontrols() pad ...
- Thu Oct 25, 2012 12:38 am
- Forum: Programming and Security
- Topic: [LUA] Need help with code plz
- Replies: 233
- Views: 68142
Re: [LUA] Need help with code plz
For the interpreter you are using you must use a colon with the print function. Example screen:print(10,10,"Hello World!",red) Also the controls function does not return a number unless you make a control function that does so. pad:start() returns a boolean value, either true or false. Example if p...
- Wed Oct 24, 2012 11:58 pm
- Forum: Programming and Security
- Topic: [LUA] Need help with code plz
- Replies: 233
- Views: 68142
[LUA] Need help with code plz
I'm making a random number generator error index lua 24 method must be called with a colon code, what do i do? -- My Second Lua Program -- Author: Dragonxtamer596 red = Color.new(255, 0, 0) function checkcontrols() pad = Controls.read() if pad:start() then end exitgame = 1 end local choice = math.ra...