It's a problem in your code, post it and we will try and help.
Printable View
It's a problem in your code, post it and we will try and help.
I'm sorry, I forgot to add that certain other scripts I have downloaded won't work aswell, it's just the lua tutorial scripts (part 1)
where can i find the new features in the new lua,,
It could be any number of things. Have you tried running it on windows LUA player?Zitat:
Zitat von code-zero
well i have a question and if any1 knows any tut's that would be helpful but heres my prob:
kinda like aotm he has multiple angry faces shooting at the same time but i'm unsure how to do this i've been trying multiple things but can't figure out how to do it i hope you understand my prob and can help me out=-)
hi, this s my code:
it works, but i get the same two money amounts every time, 1.e+6(1000000) ,and 7.5e+5(750000) how can i make it so that each time a takes another values that what it already has? and one more thing how can i disable scientific notation??Code:b = Color.new(255, 255, 255)
System.usbDiskModeActivate()
cases = {26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1 }
money_value = {100000, 750000, 500000, 400000, 300000, 200000, 100000, 50000, 25000, 10000, 50000, 1000, 750, 500, 400, 300, 200, 100, 75, 50, 25, 10, 5, 1, .01 }
case_money = {}
while true do
pad = Controls.read()
if pad:start() then
break
end
n = 1
a = math.random(26)
screen:clear()
while n < 27 do
case_money[n] = money_value[a]
n = n + 1
end
if n >26 then
assign = false
end
screen:print(130, 100, money_value[1], b)
screen:print(130, 150, money_value[2], b)
screen.waitVblankStart()
screen:flip()
end
right before your "while true do" put:
math.randomseed(os.time() )
math.random()
math.random()
math.random()
same thing. it still doesnt work, heres my current code:Zitat:
Zitat von califrag
thanks for all ur help!Code:b = Color.new(255, 255, 255)
System.usbDiskModeActivate()
cases = {26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1 }
money_value = {100000, 750000, 500000, 400000, 300000, 200000, 100000, 50000, 25000, 10000, 50000, 1000, 750, 500, 400, 300, 200, 100, 75, 50, 25, 10, 5, 1, .01 }
case_money = {}
math.randomseed(os.time() )
math.random()
math.random()
math.random()
while true do
pad = Controls.read()
if pad:start() then
break
end
n = 1
a = math.random(26)
screen:clear()
while n < 27 do
case_money[n] = money_value[a]
n = n + 1
end
screen:print(130, 100, money_value[1], b)
screen:print(130, 150, money_value[2], b)
screen.waitVblankStart()
screen:flip()
end
ok i decided to try to learn LUA. I started with trying the "hello world" thing (using notepad), I typed the code and every thing and I saved it as script.lua but it saved as a text document. How can I make it save as a LUA file??? sorry for the incredibly noobish question its just i am very new to programing.
Thanks guys :icon_smil
if the name is somethin like blah.txtZitat:
Zitat von MrBoots
then just simply rename it to blah.lua
windows may ask you that is may not work if u chage the file extension, but ignore that.