The Cartooners Posted August 29, 2008 Share Posted August 29, 2008 I have created a function as listed below by editing the lua file within Notepad. function SaveGame() cartUphillChallenge:RequestSync() Wherigo.ShowScreen(Wherigo.MAINSCREEN) Wherigo.MessageBox{Text=[[Your game has been saved.]],} end Then I created an event named Save. I then went back into Notepad and added SaveGame() to the event. Tools > View Parse Errors now displays 1 parse error preventing me from publishing to my machine. Question: What have I done wrong and how do I get rid of the parsing error? Thanks in advance. Quote Link to comment
+allec Posted August 29, 2008 Share Posted August 29, 2008 Put your event (the one with "SaveGame()") in the "Author Functions" section. The Editor will still show you a parse error, but you will be able to compile successfuly, and use the Emulator to save, using your triggering event. Quote Link to comment
+Geofellas Posted August 30, 2008 Share Posted August 30, 2008 You can either move your calling function into the authors area as suggested in another repsonse or, if you don't want to do that, you can try creating a dummy variable ("dummy" say) and inserting the code dummy = function() into your builder managed function. The function will get executed and you never need to use the value of "dummy" This has worked for me so far. It seems that the builder assumes that functions are intended to return values rather than simply have sideeffects, thereby proving that "assume" is making an "a**" out of "u" and "me" (oh isn't that bizarre - this forum replacess the two "s"s in removespaces("a s s") with stars - aren't we just so PC. I wonder what it does with "arse" - apparently nothing - good job we are not discussing zoological topics about quadripeds ) Quote Link to comment
Ranger Fox Posted August 31, 2008 Share Posted August 31, 2008 oh isn't that bizarre - this forum replacess the two "s"s with stars. That's because this is a family-friendly forum. Kids can learn swearing from other places (too many), so we really don't need to have it here. As a moderator, I'll also request any serious discussion or critiquing on the matter of the automatic swear word replacement feature be placed in one of the General Geocaching Discussions forums, wherever seems appropriate. This same feature, by the way, is also used to correct common misspellings of "Wherigo", so it's not all bad. Personally, I felt guilty about both editing and not someone's forum post when "Wherigo" was misspelled. I ended up leaving them alone out of courtesy. 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.