Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD Beta Forum
adamwalker
Apprentice


Joined: 12 Mar 2005
Posts: 195

PostPosted: Sat Nov 11, 2006 7:30 pm   

[1.15] Does not compile : syntax error
 
Just use the compatability editor, which i might add not only works now. Not only works amazingly. But is perhaps the best thing ive ever used in zmud! So damn simple and so much help! Bit upsetting to see how bad my code is.

Does not compile : syntax error

99% of my errors are due to use of

@variablename = blahblahblahblah

instead of

variablename = blahblahblahblah

think there is anything we can do about that? i know its my bad code, and it know its something i should have been aware of right back at zmud 6.0. but any chance of getting something to auto correct it or ignore it?

Thanks zugg
Reply with quote
Seb
Wizard


Joined: 14 Aug 2004
Posts: 1269

PostPosted: Sat Nov 11, 2006 9:08 pm   
 
Well, the xml export / import in CMUD has some problems at the moment, I think. So, assuming that you are exporting scripts from zMUD, you could something like this to fix your scripts in zMUD first:
(a) Use export / import in zMUD and fix your scripts using a text editor capable of regular expression search and replaces (e.g. TextPad). However, export / import in zMUD also has some issues - I think with multiline triggers - not too sure.
(b) Use the class script tab (on each class) in a similar fashion to (a) but without exporting and reimporting.
(c) With CMUD closed, and backing up your pkg file, you might be able to use a SQLite editor to find the syntax problems in the settings database and fix them.

None of these are very safe though. (Make backups.) What I would probably do is use the compatibility report to fix my zMUD scripts in zMUD as far as possible, one by one. Then reimport into CMUD and fix any issues where the behaviour has changed since zMUD. That way if you need to reimport your *.MUD file another day, it was have less things that need fixing again.
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Sat Nov 11, 2006 9:29 pm   
 
Nope, sorry, that's just a really bad syntax. What is really means is to retrieve the value of the @variablename and then use that as the name of the variable to assign the value to. So it really has a completely different meaning than a normal assignment, and it's important for people to understand this difference and fix their code so that they can learn a bit more about how programming works and keep from making similar mistakes in CMUD or other languages.

But the compatibility report should make it pretty quick and easy to click on each problem and correct it.

It's possible in the future that I'll add some additional AI to the compatibility report and provide links that will auto-correct common problems like this.
Reply with quote
adamwalker
Apprentice


Joined: 12 Mar 2005
Posts: 195

PostPosted: Sat Nov 11, 2006 10:07 pm   
 
thats just the way ive always done it, what ill probably do is fix all the problems in zmud first. so its all fixed if i have to reimport into cmud each version. makes more sence that way

screams at old code.

Hehe
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD Beta Forum All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net