GameSalad Crashing When trying to pull text from Table
So I'm trying to create a Dice roll app that basically has a trigger actor which when touched, randomizes an attribute from 1-36. I have another actor that changes its image depending on the number that is randomly generated using the TableCellValue function...
In the same table there is a Text Column with the Roll Type (Hard Eight, Hard Six, Snake Eyes) and another column that has the Roll Values (1-6)
The issue I'm having is when I try displaying the text from the Roll Type, it displays almost every Roll Type correctly every time I touch the trigger Actor UNTIL (and get this!) it rolls a six... and then gamesalad crashes! If I try changing the Display Behavior to pull from one of the other columns (such as the value or image name field) it works fine... it's only when I try displaying the Roll Type Column and then only when it "rolls" a six!
What's odd is that I had tried building it before using two different dice and it did the SAME exact thing with the crashes whenever it rolled a six!
In the orginal app I had the rules set up so that
If the Total Value = 6
If Die1 =/= Die2
Change Attribute RollType to Six Easy
I though at first it might be the amount of combinations that a six can roll, but it doesn't happen when I roll an eight... which has the same amount of combinations as the six...
The most recent build of the app has 1 actor with 36 different images of the possible combinations of 2 dice, and it STILL happens whenever I roll a six and it tried displaying the text "Six Easy" or :"Six" or no matter what words are in there...
Crazy!
Comments
You need to watch for a zero value when using an attribute to call a column/row it will cause a crash.
Guru Video Channel | Lost Oasis Games | FRYING BACON STUDIOS
Thanks for replying Dave, I don't think that could be my issue though, since i had the random function set up to only pull from the numbers 1-6 when trying to pull from the tableCellValue.
for example: this is how i basically had it set up:
constrain "die1" to random(1,6)
constrain "die2" to random(1,6)
When Touch is pressed
Set Self.Die.Image to TableCellValue(tb_DiceValues,die1,2)
Set Self.Die.Image to TableCellValue(tb_DiceValues,die2,2)
upon further testing, it seems it seemes to crash on other combinations of dice... so i'm stumped as to what could be the cause of this... is there a limit as to how many values that can be pulled from a single row? or pulling from multiple rows at the same time?
btw, I'm using the Windows version of GameSalad
Any chance you can strip out everything but those rules and upload the zipped project file? The only odd thing about your rules is that you are constraining attribute values to random values instead of using Change Attribute behaviors but I don't think that would cause a crash. It just seems unnecessary.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
This early version causes gamesalad to crash if I try rolling the dice too many times...
Guys, I wanted to thank you for trying to assist me with this issue. It must've been a bug in the last version of Creator before the major updated version. I just installed the new version of Creator (1.0.5...) and it doesn't crash anymore. I've gone back and tried the older versions of my app in the newer version of Creator, and they all work fine. Thank you again Lost_Oasis_Games and tatiang for trying to help.
Glad to hear it!
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User