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
Libervurto
20
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 15th Jan 2013 21:12 Edited at: 15th Jan 2013 21:14
I didn't really know where to put this so here it is!
While trying to work out a tricky string manipulation function I stumbled across a good way of planning it out visually. This method helped me a lot so I thought I'd knock up a version in inkscape so you guys can see it and hopefully something like this will help you too.





Here's the code I ended up with.


Shh... you're pretty.
Sasuke
20
Years of Service
User Offline
Joined: 2nd Dec 2005
Location: Milton Keynes UK
Posted: 15th Jan 2013 21:41 Edited at: 15th Jan 2013 21:42
Is this a forum bug: )!"~"

I'm guess the exclamation mark should be an equals?
Libervurto
20
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 15th Jan 2013 21:53 Edited at: 15th Jan 2013 21:53
"!" is NOT in DBC.

Shh... you're pretty.
Sasuke
20
Years of Service
User Offline
Joined: 2nd Dec 2005
Location: Milton Keynes UK
Posted: 15th Jan 2013 21:56
Strange that DBC is different is some cases than DBPro
Lukas W
22
Years of Service
User Offline
Joined: 5th Sep 2003
Location: Sweden
Posted: 16th Jan 2013 13:01 Edited at: 16th Jan 2013 13:02
Gives me compile error too.

I use U75 and Codesurge, had to replace with <> but then this bit
print _replace1$(b$,"Ship#(~,2)","shipy(~)")
print _replace1$(b$,"Ship#(~,3)","ship_owner(~)")
did not work ;D

edit: also had to replace "replace$" with "replace1$" because of user plugins. A quick Ctrl+R job >.>

The Taffer (+TaffED)
A thief inspired game along with the mission editor (DBPro). [on hiatus]
Libervurto
20
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 16th Jan 2013 13:21
The code works fine in DBC, I haven't checked it in DBP because that's not the point here. Running the code just shows two strings on screen, if you want to see how the visual planning corresponds to the code then you will have to read the code.

Shh... you're pretty.

Login to post a reply

Server time is: 2026-07-07 05:14:57
Your offset time is: 2026-07-07 05:14:57