+StaticTank Posted September 12, 2008 Share Posted September 12, 2008 I am having a problem with Dialog boxes. If I use a comma in a dialog box and then close and save the file. When I open it back up with the builder it seems like it cuts off every thing after the comma. It looks like in the LUA the Dialog box code uses commas for dividing different sets of dialog. This seems like it could be a serious issue. Unless I am missing something here. Sometimes after saving a file that this has happened in I have to go in a edit the LUA or I get an error message. StaticTank Quote Link to comment
J2B2 Posted September 12, 2008 Share Posted September 12, 2008 Commas should definitely not cause a dialog box to break. Would you mind uploading the lua file so someone can take a look at the code? Quote Link to comment
+StaticTank Posted September 12, 2008 Author Share Posted September 12, 2008 (edited) It only seems to happen when I am using a variable like Player.Name along with the opening and closing double brackets. I didn't have the exact file here at work, but since I spent a lot of time trying to figure out why my instructions were disappearing I can now replicate the situation. In the .lua file I am sending you, look at the coding in the OnStart event. The complete text is all there. If you open the file with the builder and look at the OnStart event the builder cuts off everything after my comma. If you save it, it will not open again unless you edit the .lua file. If you have more questions please let me know. Test1.zip Edited September 12, 2008 by StaticTank Quote Link to comment
+sTeamTraen Posted September 12, 2008 Share Posted September 12, 2008 I can reproduce this with builder version 2.0.5129.5086. My guess is that the builder's parser is looking for "the first comma after the pair of right brackets which (it presumes) closes the string", and isn't sophisticated enough to handle string expressions. Quote Link to comment
+Geofellas Posted September 13, 2008 Share Posted September 13, 2008 I can reproduce this with builder version 2.0.5129.5086. My guess is that the builder's parser is looking for "the first comma after the pair of right brackets which (it presumes) closes the string", and isn't sophisticated enough to handle string expressions. I too have experienced this. Since I make extensive use of string expressions (rather than simple strings), I suspect that this is a very likely explanation for the cause of the problem. Now I know what to avoid in future. Workarounds that come to mind are: 1) move the function to the author area, or 2) create a string variable called comma with the value of "," and use it instead of typing a comma, or 3) avoid using commas in dialogs Quote Link to comment
J2B2 Posted September 22, 2008 Share Posted September 22, 2008 Thanks StaticTank, this bug has been reported. Sorry about the delayed followup. In the meantime, concatenating a variable with a text string that includes commas works fine in message boxes, so using a messagebox might be the simplest workaround. J2B2 Quote Link to comment
+StaticTank Posted September 23, 2008 Author Share Posted September 23, 2008 (edited) Thanks StaticTank, this bug has been reported. Sorry about the delayed followup. In the meantime, concatenating a variable with a text string that includes commas works fine in message boxes, so using a messagebox might be the simplest workaround. J2B2 Actually using a message box was what caused the start of my troubles. I had a long set of instructions on how to play the cartridge show before you started to play. This caused the Colorado to crash when you started the cartridge. So I changed it to a series of dialog boxes and ran into a whole new set of issues. I ended up not using commas in the end. I have completed the cartridge and it is now the second one in South Dakota. If you want to check it out it is called: Where in Sioux Falls is Carmen Sandiego? Edited September 23, 2008 by StaticTank Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.