Image

Imagesciucaro wrote in Imagepython_dev

String Thing

Aye, another quick question on my MUDing quest I must ask...

I've come across a predicament when it came to writing up the input command you feed the game server. I was able to make it output little information, using list index to cut out the command, from the rest of the input string, for something like "Say".

Input: say hello there
Output: hello there


Where I'd 'have' to index Input[:4] and similar just to have it read a say.

But what if I wanted to do something like, give a number of items to a target player?

I tried a lot of methods. I made the separator of each string a ' ' space, but an item like 'gold sword' would cut around the word and it'd crash my file.

Anyone got other ways of getting this input grammar done? Thanks!

~SciuCaro