[Home] [Downloads] [Search] [Help/forum]

Gammon Software Solutions forum

See www.mushclient.com/spam for dealing with forum spam. Please read the MUSHclient FAQ!

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  General
. . -> [Subject]  phpscript

Home  |  Users  |  Search  |  FAQ
Username:
Register forum user name
Password:
Forgotten password?
(New message)
Subject: phpscript
Name:
Your forum user name.
Register forum user name
Password:
Your forum password.
Forgotten password?
Message:
Message to be posted (in English, please).
Forum codes:
Check this if your message uses 'forum codes' or templates (auto-detected for new posts).
Forum codes Templates

Save this message ...


Subject review (reverse sequence)

Posted by Yoblew   (4 posts)  [Biography] bio
Date Fri 07 Aug 2009 02:31 PM (UTC)  quote  ]
Message
Thanks for the reply Nick. I think im starting to see some of the...nuances of using php as i started writing for it. I've used lua quite a bit back when i played WoW, so its not that i dislike it, i just thought it would be fun to do in php. However the tiny differences between actual php on a webpage/script and using it within mush are starting to drive me nuts. Most of it i assume is my general lack of knowledge regarding MUSH itself. I'm gonna keep pressing on with it for now. I think more then anything i need to learn how to use Mush itself.

[Go to top] top

Posted by Nick Gammon   Australia  (18,801 posts)  [Biography] bio   Forum Administrator
Date Thu 06 Aug 2009 09:48 PM (UTC)  quote  ]
Message
As far as I know, it works.

However different script engines, when shoe-horned into the Windows Script Interface, work with varying degrees of success. I think for a while PHP had an annoying side-effect that it would simply close the client and exit the entire process, if there was a syntax error in your script.

Personally, I would recommend using Lua instead. The structure of Lua is similar enough to PHP (and C for that matter) that it isn't too hard to pick up. I speak as someone who writes a lot of code in Lua, and also maintains my web pages in PHP.

There are some functions and functionality only available in Lua. For example, triggers get a table of all the style runs in the matching line. There are also some script extensions in Lua, like getting all the files in a directory.

The other advantage of Lua is, since it is bundled with MUSHclient, if you write a script or plugin in Lua, you can be sure other players can use it. If you use PHP, they have to install that first.

Oh, and the help files which come with MUSHclient have help built into them for all the standard Lua libraries, so you can quickly look up the syntax of things like string.find.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Yoblew   (4 posts)  [Biography] bio
Date Thu 06 Aug 2009 08:33 PM (UTC)  quote  ]
Message
Is php still useable within Mushclient? I see the option for it in the dropdown and i can output the version, so i know i at least that have part setup, and i read a thread on the globals, but is it something thats worth pursuing to use? I use php on a daily basis so i'd like to give it a go but if i've got to go to some extremes to make it work i'll just use perl or lua.
[Go to top] top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


668 views.

[Reply to this subject]  Reply to this subject   [New subject]  Start a new subject   [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

[Home]

Written by Nick Gammon - 5K

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( http://www.gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Internet Contents Rating Association (ICRA) - 2K]    [Web site powered by FutureQuest.Net]