rule condition stopped working
hoomann210
Member Posts: 63
hi...so i have a condition in a rule,if text expression of a certain cell contains some text then do this..it was working just fine but suddenly one day opened the game and saw it doesn't check the condition at all and does the thing no matter what the condition is...i changed it to other types of conditions but its the same...even created a new actor,deleted the rule and used a new one none of them works..has it happen to anyone before?
Comments
All sorts of things can happen when you're creating rules. Tiny changes in a project can affect other behaviors, actors, etc. depending on how your logic is structured. Can you post a screenshot of your rule?
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
s1072.photobucket.com/user/hoomann210/media/Untitled_zpss8p6lwsg.jpg.html
in this actor that time purchase attribute changes to 1 no matter the condition..i have another actor exactly the same with another attribute but that works fine..this is the only place that it has to change to 1
So you're sure that the tableCellValue does not contain "purchased"? What happens when you add a Log Debugging Statement to that rule and then open the Debugger window. Does the statement appear there? And if you add another Log Debugging Statement that contains the same tableCellValue expression, what appears for that in the Debugger window?
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
actually the cell is empty...i added a debugger to the rule and it shows the statement..i added another one to show the value and it shows nothing cause it's empty
Hmm, well that's certainly unexpected.
If you'd like to .zip the project file, upload it to a file-sharing site and post the download link (or send me a private message with it), I can take a look and see if it's something obvious. If you do send it in a private message, please reference the URL for this thread (http://forums.gamesalad.com/discussion/85940/rule-condition-stopped-working/#latest).
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
have you tried Run to Completion on your timer. I noticed it was unchecked. I never seen anyone save the PurchaseTable before. Doubt that would do anything but just caught my eye.
Also, is that column in the table set to type "Text"? Because you're using a text expression to compare it and if it's something else such as boolean or integer, that will have unpredictable results.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
guys i took care of it...i created a new scene,created new actors with exactly the same rules..it works fine..don't know what happened to them but it felt like they got corrupted or something..it's a bug that they should get it fixed..imagine the time that you have to create a whole new project in order to get it right
anyway thanks for your time tatiang and AJaymz
really appreciate it
Stuff like this happens to me also. I have the same exact code that is not working and then erase and redo it and suddenly it works. Very frustrating working with bugs like this.
@KC_Games not only u have to save your project every 10 mins but also make a copy of it too
Hi @hoomann210
Glad you got it sorted. Just to add, I vaguely remember having a hiccup in the past with using "contains" when the word is the full word. Perhaps if you have the problem again in future change "contains" to "is".
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps
@gyroscope hope it won't happen again..but if it does i'll remember that..thanks