Author Topic: Text Based Games  (Read 13023 times)

0 Members and 1 Guest are viewing this topic.

Offline simplethinker

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 695
  • Rating: +16/-5
  • snjwffl
    • View Profile
Re: Text Based Games
« Reply #30 on: July 09, 2009, 03:28:58 pm »
errors on the third arrow?
Found the problem!  It should be
Code: [Select]
:"DOTHIS TOTHIS"→Str1
:inString(Str1," "→A
:sub(Str1,1,A→Str2
:sub(Str1,A+1,length(Str1)-A→Str3
(it was the inString command)
You might also want to add in an If:Then statement to deal with there being no space in the string.

[edit] I accidentally had "len(" instead of "length("
« Last Edit: July 12, 2009, 12:01:48 pm by simplethinker »
"We've all heard that a million monkeys banging on a million typewriters will eventually reproduce the entire works of Shakespeare. Now, thanks to the Internet, we know this is not true." -- Professor Robert Silensky



Chip's Challenge: ħ%

Offline JoeyBelgier

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 545
  • Rating: +25/-21
  • Joey
    • View Profile
Re: Text Based Games
« Reply #31 on: July 12, 2009, 09:52:25 am »
What command is this 0.0
len(

Offline {AP}

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 981
  • Rating: +74/-3
  • I am Webmaster!
    • View Profile
    • Removed From Game
Re: Text Based Games
« Reply #32 on: July 12, 2009, 10:17:08 am »
length(
Outputs how many characters are in the string. (how long it is)

Offline JoeyBelgier

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 545
  • Rating: +25/-21
  • Joey
    • View Profile
Re: Text Based Games
« Reply #33 on: July 12, 2009, 10:50:38 am »
ok^^
sorry for being retarded at this XD

Offline {AP}

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 981
  • Rating: +74/-3
  • I am Webmaster!
    • View Profile
    • Removed From Game
Re: Text Based Games
« Reply #34 on: July 12, 2009, 11:02:52 am »
It's no problem at all.
Everyone started somewhere and no one knows everything~

Actually, if I didn't look at the code, I wouldn't have realized exactly what he meant by "len(" either. ;P

Offline simplethinker

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 695
  • Rating: +16/-5
  • snjwffl
    • View Profile
Re: Text Based Games
« Reply #35 on: July 12, 2009, 12:01:21 pm »
What command is this 0.0
len(
Sorry about that!  I didn't notice I used the wrong command.
"We've all heard that a million monkeys banging on a million typewriters will eventually reproduce the entire works of Shakespeare. Now, thanks to the Internet, we know this is not true." -- Professor Robert Silensky



Chip's Challenge: ħ%

Offline JoeyBelgier

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 545
  • Rating: +25/-21
  • Joey
    • View Profile
Re: Text Based Games
« Reply #36 on: July 12, 2009, 12:33:30 pm »
What command is this 0.0
len(
Sorry about that!  I didn't notice I used the wrong command.

np mate ^^

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Text Based Games
« Reply #37 on: July 22, 2009, 07:36:39 pm »
I think Lenght( is slow, though. Is it fast enough for what you want to do? I know for collision detection stuff, it makes the game unplayable x.x

Offline JoeyBelgier

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 545
  • Rating: +25/-21
  • Joey
    • View Profile
Re: Text Based Games
« Reply #38 on: July 23, 2009, 03:06:20 pm »
collision detection?
it's about text parsing :P
but i can't really do it right now,
not much time (becouse of my work)
no motivation  (becouse of my work)
and no energy (becouse of my work)

Gee, work stinks
 :-X

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Text Based Games
« Reply #39 on: July 23, 2009, 11:54:21 pm »
I know, I was just mentionning because Lenght is also used for that stuff in other games and knowing it was slow, I was afraid it might also be too slow for text based games text parsing

Offline JoeyBelgier

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 545
  • Rating: +25/-21
  • Joey
    • View Profile
Re: Text Based Games
« Reply #40 on: July 24, 2009, 10:45:24 am »
owh  ::)