Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Author
Message
BlackChaos
16
Years of Service
User Offline
Joined: 2nd May 2010
Location: London
Posted: 10th Sep 2011 20:39 Edited at: 10th Sep 2011 23:22
Prob about time that i posted something useful so here!

Its a text wrapper. You know! In MS word when your about to write off the page and it jumps to the next line

Anyway this is V1 just to sort-of demonstrate the possibilities. Essentially you can write the longest string you want and it will create new lines to accommodate.



bchaos101
BlackChaos
16
Years of Service
User Offline
Joined: 2nd May 2010
Location: London
Posted: 10th Sep 2011 20:44
Sorry my browser there are some errors in the last post(Something happened when i hit submit)


bchaos101
Grog Grueslayer
Valued Member
21
Years of Service
User Offline
Joined: 30th May 2005
Playing: Green Hell
Posted: 11th Sep 2011 03:09
It's not bad but the way you wrote it you'll never see the results.



The above calls the WordWrapper function that will eventually print the results to the screen. But then it hits CLS and clears the screen so the user doesn't have enough time to see it. But again even if the CLS wasn't there it wouldn't work because you have SYNC ON at the top of the code and no SYNC to update the screen changes.

It's best to keep it out of a DO/LOOP (so it only does it once) and SYNC the screen. And the worst offence of them all is you use WRAP as an array which conflicts with IanMs Matrix 1 Utilities Plugins WRAP command. Once you have IanMs commands installed it's a reserved keyword... and since you didn't know that it means you don't have IanMs Matrix 1 Utilities Plugin which is even worse! You're missing out on a lot of good text commands that'll make a text wrapper even easier to make (like the SPLIT STRING command).

I changed WRAP to TWRAP:


Try IanMs Matrix 1 Utilities Plugin to see the cool text commands (and all the others): https://forumfiles.thegamecreators.com/download/2257295

IanM
Retired Moderator
23
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 11th Sep 2011 15:26
Quote: "and since you didn't know that it means you don't have IanMs Matrix 1 Utilities Plugin which is even worse!"

It's not the Law ... yet!

I have some example code that does this kind of thing with my own string commands, except that it requires you to specify the pixel width you want the text to fit within instead of the number of characters.


You will need my plug-ins to get this to work

Pincho Paxton
23
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 11th Sep 2011 16:52
Why is it called Matrix 1 anyway? Nobody would look for text code called Matrix 1. I always thought it was Matrix code. You should rename it so that people can find it.

IanM
Retired Moderator
23
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 11th Sep 2011 18:21
It's not called 'Matrix 1', it's called 'Matrix1'. It's nothing to do with the film either - my hostname was registered in 1996, 3 years before the film was made.

TBH, I can't remember why I selected the name either...

Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 11th Sep 2011 18:26
But "everyone" knows you need it whatever it's called.
Grog Grueslayer
Valued Member
21
Years of Service
User Offline
Joined: 30th May 2005
Playing: Green Hell
Posted: 11th Sep 2011 18:35
Quote: "It's not the Law ... yet!"


Yeah it needs to be Law.

Quote: "It's not called 'Matrix 1', it's called 'Matrix1'."


I just noticed that myself. I won't use the space again. Just using "Matrix1" in the search finds it at the top of the list where it belongs.

Quote: "TBH, I can't remember why I selected the name either..."


I figured you made the first group and decided to name it that... then later added the second group and just kept the name of the first group of commands.


@ Green Gandalf:

Amen! Only the cool people have IanMs Matrix1 Utilities Plugin.

Pincho Paxton
23
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 11th Sep 2011 18:37
I have it but never used it, because I've never needed a matrix in my games before.. see the confusion?

Grog Grueslayer
Valued Member
21
Years of Service
User Offline
Joined: 30th May 2005
Playing: Green Hell
Posted: 11th Sep 2011 18:50 Edited at: 11th Sep 2011 18:51
Not even the extended MID$() command that brings MID$() back to it's Basic roots? I'm sure you know that the Darkbasic version of MID$() takes out only one character from as string but IanMs version takes out multiple characters (as the original Basic command did).

Or how about the DATAFILE commands? It's extremely hard to do a database in Darkbasic without having to rewrite the entire file because all the file commands require a non-existent file to write. IanMs DATAFILE commands allow us to open a file and write to it without first having to destroy the file.

I'm starting to think I need to use an apostrophe in IanMs name now. Which is right "IanMs" or "IanM's"?

Pincho Paxton
23
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 11th Sep 2011 18:53 Edited at: 11th Sep 2011 18:53
No because I thought it was a matrix utility, and they are string commands.

Grog Grueslayer
Valued Member
21
Years of Service
User Offline
Joined: 30th May 2005
Playing: Green Hell
Posted: 11th Sep 2011 19:17
Really? Here's a link to IanMs online help files that shows what each group of commands do.

http://www.matrix1.demon.co.uk/Matrix1Utils_Help/Matrix1_Index.html

The string commands are in group 16 and the DATAFILE commands are in group 22 but of course there are many more useful commands just waiting for you to discover.

IanM
Retired Moderator
23
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 11th Sep 2011 19:36
Quote: "Which is right "IanMs" or "IanM's"?"

The second - the apostrophe is added to denote possession.

... although I guess you could also add it as a contraction from my full name too.

Does it get better than this? Free plug-ins with an English lesson thrown in too!

Mugen Wizardry
User Banned
Posted: 11th Sep 2011 19:41
@Ian, can you please show me how to make it so I can add a parameter such as:

<color=68,207,252>M<color=255,0,0>y <color=0,0,0>Color</color>

So it shows the M in blue, the y in red, and the rest of the text in black?

Thanks!

CHECK OUT MY WEBSITE AT http://imageposeidon.com/ !
Pincho Paxton
23
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 11th Sep 2011 20:11
Quote: "Really? Here's a link to IanMs online help files that shows what each group of commands do.

http://www.matrix1.demon.co.uk/Matrix1Utils_Help/Matrix1_Index.html

The string commands are in group 16 and the DATAFILE commands are in group 22 but of course there are many more useful commands just waiting for you to discover. "


That's not the point. People telling you that it's a string DLL after you find out that it's a string DLL is too late. Everyone needs a name that reflects the DLL functions. Now I am working on a matrix I included the DLL's, but I'm not working on strings at the moment.

WLGfx
18
Years of Service
User Offline
Joined: 1st Nov 2007
Location: NW United Kingdom
Posted: 11th Sep 2011 20:21
Sorry Pincho but reading these last few post made me giggle...

Matrix1 does tons of useful and possible scary stuff too, not just strings. It took me a while before I started to add dll's and the Matrix1 set I would say for DBPro users is essential. It's now a part of PureGDK which helped sway me over to that too.

Warning! May contain Nuts!
Pincho Paxton
23
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 11th Sep 2011 20:43
If it was me I would have split them up into different dll categories. Each dll having a name to match the dll.

IanM
Retired Moderator
23
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 11th Sep 2011 23:56
1. I'm not you.
2. They're named the Matrix1 Utility Plug-ins for a reason. Matrix1 from my demon internet name, Utility because they aren't targeted at a single area, and Plug-ins because there are many of them.
3. They've been on release since the second half of 2005 and you hadn't picked up on the fact that there are over 1000 additional and widely varying commands in the set?

There's just no pleasing some people

@Grog,
Grog, you obviously need to step up your campaign!

Quote: "I figured you made the first group and decided to name it that... then later added the second group and just kept the name of the first group of commands."

It's the 'Matrix1' part that I can't remember the origin of - see above for the reason behind the rest of the name.

Pincho Paxton
23
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 12th Sep 2011 00:28 Edited at: 12th Sep 2011 00:33
Well your plan took me 6 years to discover. Is that what you want? I just go by names. If something is called Matrix utils, I think it is Matrix Utilities. That is what most people would think. Even your signature says the same thing.

JackDawson
14
Years of Service
User Offline
Joined: 12th Jul 2011
Location:
Posted: 12th Sep 2011 00:36
Quote: "Amen! Only the cool people have IanMs Matrix1 Utilities Plugin."


Man, wish I could be cool like you people.. WAIT. I have been using those plugins.. I'M COOL !!! lmao

"Life is like a box of chocolates.. eat it before it melts."
Mugen Wizardry
User Banned
Posted: 12th Sep 2011 01:12
Quote: "@Ian, can you please show me how to make it so I can add a parameter such as:

<color=68,207,252>M<color=255,0,0>y <color=0,0,0>Color</color>

So it shows the M in blue, the y in red, and the rest of the text in black?

Thanks!"


CHECK OUT MY WEBSITE AT http://imageposeidon.com/ !
Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 12th Sep 2011 02:31
This might help

Grog Grueslayer
Valued Member
21
Years of Service
User Offline
Joined: 30th May 2005
Playing: Green Hell
Posted: 12th Sep 2011 07:31 Edited at: 12th Sep 2011 07:32
@ IanM:

Yeah, I'll definitely step it up the campaign to show/inform everybody about the awesomeness of IanM's Matrix1 Utilities Plug-ins.


@ JackDawson:

I was hoping you were one of the cool people.

Mugen Wizardry
User Banned
Posted: 12th Sep 2011 14:26
@GG, this works for single letters AND multiple words?

CHECK OUT MY WEBSITE AT http://imageposeidon.com/ !
Mugen Wizardry
User Banned
Posted: 12th Sep 2011 15:35 Edited at: 12th Sep 2011 15:38
Um, Gandalf? It cuts out part of the word o.o



Also, is there any way that I can control the colors with a variable? <color 255,0,0>M<color 0, 255, 0>y <color 0, 0, 255>Text</color>

Thanks GG!

CHECK OUT MY WEBSITE AT http://imageposeidon.com/ !
Grog Grueslayer
Valued Member
21
Years of Service
User Offline
Joined: 30th May 2005
Playing: Green Hell
Posted: 12th Sep 2011 17:01 Edited at: 12th Sep 2011 20:36
Being an old SysOp of a Renegade BBS before the internet existed I prefer to use pipe codes to color text. When you want to change colors just type |##| within the string (the ## representing the 2 digit color number you wish to change to).



The above requires IanM's Matrix1 Utilities Plugins to work properly or you can just write your own extended MID$() command. Making your own function for a true Basic MID$() command is easy but IanM has made our lives SO MUCH EASIER by making all those useful commands and putting them right at our fingertips.

Mugen Wizardry
User Banned
Posted: 12th Sep 2011 17:58
Parameter do not match String, Value at line 63.

I have IanM's plugins. EVERYONE does.

CHECK OUT MY WEBSITE AT http://imageposeidon.com/ !
Grog Grueslayer
Valued Member
21
Years of Service
User Offline
Joined: 30th May 2005
Playing: Green Hell
Posted: 12th Sep 2011 18:31 Edited at: 12th Sep 2011 18:36
That's weird... it works fine for me (see attached image).

Try it without using Matrix1... but don't get used to it! Use the following function instead of IanM's extended MID$() command. Change "Color=val(mid$(Tex$,t+1,t+2))" to "Color=val(Mids(Tex$,t+1,t+2))".



Mugen Wizardry
User Banned
Posted: 12th Sep 2011 18:55
Subscript must be Integer or DWORD when referencing an array at line 67.



CHECK OUT MY WEBSITE AT http://imageposeidon.com/ !
IanM
Retired Moderator
23
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 12th Sep 2011 19:24
Your 't+2' should just be '2' in that line.

Code extended to allow colours and bold/italic:


Use <color word> to specify a css3 colour, or <color #xxxxxx> to specify a hex colour. Use <bold on>, <bold off>, <italic on> and <italic off> to control the bold/italics.

Any further enhancements (I suggest a line break, and switching to the D3D plug-in) you can do yourself :p

Mugen Wizardry
User Banned
Posted: 12th Sep 2011 19:59
Thanks, @IanM! =D Works GREAT! =D

CHECK OUT MY WEBSITE AT http://imageposeidon.com/ !
Mugen Wizardry
User Banned
Posted: 12th Sep 2011 20:01
@Ian, I don't know if you're aware of this, but Matrix1util16.dll likes to argue with StyxCore.dll -.- Can u rename the function so there is no combating functions? It seems to duplicate Split String. Possibly others.

CHECK OUT MY WEBSITE AT http://imageposeidon.com/ !
Grog Grueslayer
Valued Member
21
Years of Service
User Offline
Joined: 30th May 2005
Playing: Green Hell
Posted: 12th Sep 2011 20:35
Quote: "Your 't+2' should just be '2' in that line."


Doh! <smacks head>

Thanks for spotting that error.

IanM
Retired Moderator
23
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 12th Sep 2011 22:54
@Mugen Wizardry,
No, sorry.

Remember always that I write these DLLs primarily for me and I have far too much of my own code that uses those string commands to simply rename them - only slightly less of a worry to me, is that other people also have lots of code that uses them

Besides, 'I was here first' (19th Nov 2002, compared to sometime late in 2006)

In fact, the original source code for my original 'Matrix1Utility' plug-in (singular) is still available from my site - it's well out of date now though.

Login to post a reply

Server time is: 2026-07-11 14:36:01
Your offset time is: 2026-07-11 14:36:01