Zitat:
Zitat von Grimfate126
Thats what I did but its still a text document.
Printable View
Zitat:
Zitat von Grimfate126
Thats what I did but its still a text document.
Zitat:
Zitat von Grimfate126
ooo sorry change
screen:print(130, 100, money_value[1], b)
screen:print(130, 150, money_value[2], b)
to
screen:print(130, 100, money_value[a], b)
screen:print(130, 150, money_value[n], b)
that should be giving you two different random money values. what is it you're trying to accomplish?
i think to get rid of scientific notation you would just use
string.format("%d", moneyvalue[a])
instead
me along with 2 other pepps are workin on a deal or no deal trye game. so this functions is supposed to assign each case a money value. i put the print thing just to check it. but the math.random thing for variable "a" keeps its value, so every time it starts, each case has the same money. basically, i need it like this:Zitat:
Zitat von califrag
1. a is a random number from 1 to 26.
2. when n is increased by one, "a" now equals ANOTHER number from 1 to 26, and so on, besides the number that has already been chosen.
sry if i sound confusing
Never mind I fixed it. My mistake
Ok, so my problem IS my source code then, here:
Code:blue = Color.new(0,0,255)
screen:print(200, 130, "My name is Code-Zero!", blue)
screen.flip()
while true do
screen.waitVblankstart()
end
Just a quick guess before i start coding, try this:Zitat:
Zitat von code-zero
Code:blue = Color.new(0,0,255)
while true do
screen:print(200, 130, "My name is Code-Zero!", blue)
screen.waitVblankstart()
screen.flip()
end
Zitat:
Zitat von Grimfate126
dude.. well.. i couldn't figure out how to do it from your code.. so I just wrote the code myself.. i understood what you meant.. just look at the attached script file... basically it builds a table of case numbers, sets a default case, removes it from the table, then each time "x" is pressed it selects a random case from the ones which are left, and then sets a new value for it... just download the script file and the eboot and test it out... pretty it up with some images and let me know how it works out for you!
Wow you took the liberty to goZitat:
Zitat von califrag
code a version yourself to help someone out :razz: .
You good man deserve an award and maybe 1000 Points?
If you want to claim your Award PM me saying so :icon_wink .
Dont worry, this aint no scam. c5cha7 is looking for good
people in the scene to donate my points to :D .
I appreciate the offer but really I did it because I think it's a neat idea and it was a good ten minute exercise for me to learn how to remove and add to a table ;D I honestly would probably not use the points even if you gave them to me, but thanks anyways! Did you test out that script? did it work for you like it needs to?Zitat:
Zitat von c5cha7
Nope, didn't work, it just says error: no script file found