+galtanegra Posted February 6, 2008 Share Posted February 6, 2008 Hi ! I am starting up building my first Wherigo Cartridge. I have advanced quite a lot but I have several problems with the internal editor of the builder. One of the more trickys that has happened to me is a random one (with random I mean that it does not happen always). It happens when I want to write a message box (function 'Show a message to player') inside a conditional clause and I add one or more carriage returns to the text of the message. Basically when I save the project the function owning the message box is corrupted, because some of the 'else' instructions following the message boxes dissapear and so, all the logic of the function is broken. I am working with the latest version of the builder and editing the functions from the internal editor. Have you notice that and maybe do you have a workaround for this? Thanks in advance and BTW congratulations for this exciting project !! Quote Link to comment
Ranger Fox Posted February 6, 2008 Share Posted February 6, 2008 Would you be able to post the broken function? I haven't had that happen yet, but I think there would be interest in seeing what the resulting Lua function looks like. If you're not familiar with going into the code file, that's okay, too. I could offer some easy instructions if you'd like. Has anyone else run across this? Quote Link to comment
+galtanegra Posted February 6, 2008 Author Share Posted February 6, 2008 Thank you for your quick answer Ranger Fox. I have sent you an e-mail. Quote Link to comment
Ranger Fox Posted February 6, 2008 Share Posted February 6, 2008 I received the problematic code from the thread owner and asked permission to anonomize it. I left the punctuation and line returns intact. Copy and paste will interpret the line return characters as they are and not the ASCII character. I'll look at this myself as soon as I get home (I'm leaving work right now for my one-a-day cache), then post something. I'm posting this now so others can also have a look. The more people, the better our chances at someone else being able to reproduce the problem. The following is the original function, then the output that happens: function zitemZZ:OnTest() -- #GroupDescription=Script -- -- #Comment=Script Comment -- if 1 == 1 then Wherigo.MessageBox{Text=[[Lorem ipsum dollar']],Media=zmediaLibroAntiguoIcono,Callback=cartCapablanca.MsgBoxCBFuncs.MsgBoxCB21} else if 1==2 and 1==4 or 1==4 and 1==5 then Wherigo.MessageBox{Text=[[Lorem ipsum']],Media=zmediaLibroAntiguoIcono,Callback=cartCapablanca.MsgBoxCBFuncs.MsgBoxCB22} else if 1==6 then Wherigo.MessageBox{Text=[[Lorem]],Callback=cartCapablanca.MsgBoxCBFuncs.MsgBoxCB23} else if 1==7 and 1==8 then Wherigo.MessageBox{Text=[[Lorem]],Callback=cartCapablanca.MsgBoxCBFuncs.MsgBoxCB24} else if 1==9 then Wherigo.MessageBox{Text=[[Lorem 'ipsum']],Media=zmediaLibroAntiguoIcono,Callback=cartCapablanca.MsgBoxCBFuncs.MsgBoxCB25} else if 1==10 and 1==11 then Wherigo.MessageBox{Text=[[Lorem. 'ipsum']],Media=zmediaLibroAntiguoIcono,Callback=cartCapablanca.MsgBoxCBFuncs.MsgBoxCB32} else if 1==12 then Wherigo.MessageBox{Text=[[Lorem.]],Callback=cartCapablanca.MsgBoxCBFuncs.MsgBoxCB31} else if 1==13 and 1==14 then Wherigo.MessageBox{Text=[[Lorem. 'ipsum']],Media=zmediaLibroAntiguoIcono,Callback=cartCapablanca.MsgBoxCBFuncs.MsgBoxCB37} else if 1==15 then Wherigo.MessageBox{Text=[[Lorem.]],Callback=cartCapablanca.MsgBoxCBFuncs.MsgBoxCB38} else if 1==16 and not 1==17 then Wherigo.MessageBox{Text=[['Lorem' Ipsum!]],Media=zmediaLibroAntiguoIcono,Callback=cartCapablanca.MsgBoxCBFuncs.MsgBoxCB39} else if 1==18 then Wherigo.MessageBox{Text=[[Lorem.]],Callback=cartCapablanca.MsgBoxCBFuncs.MsgBoxCB40} else Wherigo.MessageBox{Text=[[sit amet]],Callback=cartCapablanca.MsgBoxCBFuncs.MsgBoxCB26} end end end end end end end end end end end end ============================================================================== Resulting output ============================================================================== function zitemZZ:OnTest() -- #GroupDescription=Script -- -- #Comment=Script Comment -- if 1==1 then Wherigo.MessageBox{Text=[[Lorem. ipsum. 'dollar.']],Media=zmediaLibroAntiguoIcono,Callback=cartCapablanca.MsgBoxCBFuncs.MsgBoxCB21} else if 1==2 and 1==3 or 1==4 and 1==5 then Wherigo.MessageBox{Text=[[Lorem. 'ipsum.']],Media=zmediaLibroAntiguoIcono,Callback=cartCapablanca.MsgBoxCBFuncs.MsgBoxCB22} if 1==6 then Wherigo.MessageBox{Text=[[Lorem.]],Callback=cartCapablanca.MsgBoxCBFuncs.MsgBoxCB23} else if 1==7 and 1==8 then Wherigo.MessageBox{Text=[[Lorem.]],Callback=cartCapablanca.MsgBoxCBFuncs.MsgBoxCB24} else if 1==9 then Wherigo.MessageBox{Text=[[Lorem. 'ipsum.']],Media=zmediaLibroAntiguoIcono,Callback=cartCapablanca.MsgBoxCBFuncs.MsgBoxCB25} if 1==10 and 1==11 then Wherigo.MessageBox{Text=[[Lorem. 'ipsum.']],Media=zmediaLibroAntiguoIcono,Callback=cartCapablanca.MsgBoxCBFuncs.MsgBoxCB32} if 1==12 then Wherigo.MessageBox{Text=[[Lorem.]],Callback=cartCapablanca.MsgBoxCBFuncs.MsgBoxCB31} else if 1==13 and 1==14 then Wherigo.MessageBox{Text=[[Lorem. 'ipsum.']],Media=zmediaLibroAntiguoIcono,Callback=cartCapablanca.MsgBoxCBFuncs.MsgBoxCB37} if 1==15 then Wherigo.MessageBox{Text=[[Lorem.]],Callback=cartCapablanca.MsgBoxCBFuncs.MsgBoxCB38} else if 1==16 and not 1==17 then Wherigo.MessageBox{Text=[['Lorem.' Ipsum!]],Media=zmediaLibroAntiguoIcono,Callback=cartCapablanca.MsgBoxCBFuncs.MsgBoxCB39} if 1==18 then Wherigo.MessageBox{Text=[[Lorem.]],Callback=cartCapablanca.MsgBoxCBFuncs.MsgBoxCB40} else Wherigo.MessageBox{Text=[[Lorem.]],Callback=cartCapablanca.MsgBoxCBFuncs.MsgBoxCB26} end end end end end end end end end end end end Quote Link to comment
+davidloew Posted February 6, 2008 Share Posted February 6, 2008 I received the problematic code from the thread owner and asked permission to anonomize it. I left the punctuation and line returns intact. Copy and paste will interpret the line return characters as they are and not the ASCII character. I'll look at this myself as soon as I get home (I'm leaving work right now for my one-a-day cache), then post something. I'm posting this now so others can also have a look. The more people, the better our chances at someone else being able to reproduce the problem. The following is the original function, then the output that happens: function zitemZZ:OnTest() -- #GroupDescription=Script -- -- #Comment=Script Comment -- if 1 == 1 then Wherigo.MessageBox{Text=[[Lorem ipsum dollar']],Media=zmediaLibroAntiguoIcono,Callback=cartCapablanca.MsgBoxCBFuncs.MsgBoxCB21} else if 1==2 and 1==4 or 1==4 and 1==5 then Wherigo.MessageBox{Text=[[Lorem ipsum']],Media=zmediaLibroAntiguoIcono,Callback=cartCapablanca.MsgBoxCBFuncs.MsgBoxCB22} else if 1==6 then Wherigo.MessageBox{Text=[[Lorem]],Callback=cartCapablanca.MsgBoxCBFuncs.MsgBoxCB23} else if 1==7 and 1==8 then Wherigo.MessageBox{Text=[[Lorem]],Callback=cartCapablanca.MsgBoxCBFuncs.MsgBoxCB24} else if 1==9 then Wherigo.MessageBox{Text=[[Lorem 'ipsum']],Media=zmediaLibroAntiguoIcono,Callback=cartCapablanca.MsgBoxCBFuncs.MsgBoxCB25} else if 1==10 and 1==11 then Wherigo.MessageBox{Text=[[Lorem. 'ipsum']],Media=zmediaLibroAntiguoIcono,Callback=cartCapablanca.MsgBoxCBFuncs.MsgBoxCB32} else if 1==12 then Wherigo.MessageBox{Text=[[Lorem.]],Callback=cartCapablanca.MsgBoxCBFuncs.MsgBoxCB31} else if 1==13 and 1==14 then Wherigo.MessageBox{Text=[[Lorem. 'ipsum']],Media=zmediaLibroAntiguoIcono,Callback=cartCapablanca.MsgBoxCBFuncs.MsgBoxCB37} else if 1==15 then Wherigo.MessageBox{Text=[[Lorem.]],Callback=cartCapablanca.MsgBoxCBFuncs.MsgBoxCB38} else if 1==16 and not 1==17 then Wherigo.MessageBox{Text=[['Lorem' Ipsum!]],Media=zmediaLibroAntiguoIcono,Callback=cartCapablanca.MsgBoxCBFuncs.MsgBoxCB39} else if 1==18 then Wherigo.MessageBox{Text=[[Lorem.]],Callback=cartCapablanca.MsgBoxCBFuncs.MsgBoxCB40} else Wherigo.MessageBox{Text=[[sit amet]],Callback=cartCapablanca.MsgBoxCBFuncs.MsgBoxCB26} end end end end end end end end end end end end ============================================================================== Resulting output ============================================================================== function zitemZZ:OnTest() -- #GroupDescription=Script -- -- #Comment=Script Comment -- if 1==1 then Wherigo.MessageBox{Text=[[Lorem. ipsum. 'dollar.']],Media=zmediaLibroAntiguoIcono,Callback=cartCapablanca.MsgBoxCBFuncs.MsgBoxCB21} else if 1==2 and 1==3 or 1==4 and 1==5 then Wherigo.MessageBox{Text=[[Lorem. 'ipsum.']],Media=zmediaLibroAntiguoIcono,Callback=cartCapablanca.MsgBoxCBFuncs.MsgBoxCB22} if 1==6 then Wherigo.MessageBox{Text=[[Lorem.]],Callback=cartCapablanca.MsgBoxCBFuncs.MsgBoxCB23} else if 1==7 and 1==8 then Wherigo.MessageBox{Text=[[Lorem.]],Callback=cartCapablanca.MsgBoxCBFuncs.MsgBoxCB24} else if 1==9 then Wherigo.MessageBox{Text=[[Lorem. 'ipsum.']],Media=zmediaLibroAntiguoIcono,Callback=cartCapablanca.MsgBoxCBFuncs.MsgBoxCB25} if 1==10 and 1==11 then Wherigo.MessageBox{Text=[[Lorem. 'ipsum.']],Media=zmediaLibroAntiguoIcono,Callback=cartCapablanca.MsgBoxCBFuncs.MsgBoxCB32} if 1==12 then Wherigo.MessageBox{Text=[[Lorem.]],Callback=cartCapablanca.MsgBoxCBFuncs.MsgBoxCB31} else if 1==13 and 1==14 then Wherigo.MessageBox{Text=[[Lorem. 'ipsum.']],Media=zmediaLibroAntiguoIcono,Callback=cartCapablanca.MsgBoxCBFuncs.MsgBoxCB37} if 1==15 then Wherigo.MessageBox{Text=[[Lorem.]],Callback=cartCapablanca.MsgBoxCBFuncs.MsgBoxCB38} else if 1==16 and not 1==17 then Wherigo.MessageBox{Text=[['Lorem.' Ipsum!]],Media=zmediaLibroAntiguoIcono,Callback=cartCapablanca.MsgBoxCBFuncs.MsgBoxCB39} if 1==18 then Wherigo.MessageBox{Text=[[Lorem.]],Callback=cartCapablanca.MsgBoxCBFuncs.MsgBoxCB40} else Wherigo.MessageBox{Text=[[Lorem.]],Callback=cartCapablanca.MsgBoxCBFuncs.MsgBoxCB26} end end end end end end end end end end end end I don't think this is the carriage return, I think there may be a parsing error in the builder app with messagebox lines that contain the exact same message data. I'm looking into this right now. Sorry for the inconvenience. David. Quote Link to comment
+galtanegra Posted February 6, 2008 Author Share Posted February 6, 2008 Hi David. Thank you for your help. Every one of the message boxes of the original code has a different text. Here it seems that the texts are repeated but this is because it has been anonomized. (Maybe I did not understand you, I am not English native, but I thought you were saying this) Cheers ! Quote Link to comment
+davidloew Posted February 7, 2008 Share Posted February 7, 2008 Hi David. Thank you for your help. Every one of the message boxes of the original code has a different text. Here it seems that the texts are repeated but this is because it has been anonomized. (Maybe I did not understand you, I am not English native, but I thought you were saying this) Cheers ! Thanks for the information. I still think that it probably was a parsing error even if all of the message boxes had different text, if the messages contain similar text, it would still have a problem. We will be releasing a new builder in the next few days with this fix and many others. David. Quote Link to comment
Ranger Fox Posted February 7, 2008 Share Posted February 7, 2008 I built a quick cartridge file around that type of code and looked at the logic flow. Something seems to be disrupting the logic flow all right. I attached the test cartridge file to the post. Check out this screen shot to see what I mean: Well, we'll see what the next builder version will do with it. logictest.zip Quote Link to comment
+davidloew Posted February 7, 2008 Share Posted February 7, 2008 (edited) I built a quick cartridge file around that type of code and looked at the logic flow. Something seems to be disrupting the logic flow all right. I attached the test cartridge file to the post. Check out this screen shot to see what I mean: Well, we'll see what the next builder version will do with it. you probably should put variables in place of the if 1 = 2 stuff. The parser is pretty forgiving, but, it doesn't know what 1 = 2 means. So, you could do this with If Player is Within proximity to a zone etc. just so that it has valid values. I do think I fixed the Message boxes because the text is very similar and I wasn't advancing the search so I would keep finding Lorem on the first line and mess everything else up. *update* I redid your cart and created variables and I am working on a parsing problem with message box text that has line feeds. I'll put it in the next build, thanks for your help on this. david Edited February 7, 2008 by davidloew 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.