Author Topic: (no subject)  (Read 3932 times)

DarkElite

  • Member
  • *
  • Posts: 1452
    • View Profile
    • http://cryosoft.mysticsoftware.net/Home.html
(no subject)
« on: January 29, 2004, 08:07:49 AM »
is there any way to make a variable by adding text and another variable?

ex.
#variable!=3
#finalvar!=var+iable+!
#Mwin(finalvar!) *should show 3 in message window

althought im fairly certain that will not work, but you get the basic idea.
« Last Edit: December 31, 1969, 06:00:00 PM by DarkElite »
DarkElite

Dei vobem omniam proditiverunt.  Iam vobis quis deposcibitis sacrificium rersum vitae est!

DarkElite

  • Member
  • *
  • Posts: 1452
    • View Profile
    • http://cryosoft.mysticsoftware.net/Home.html
(no subject)
« Reply #1 on: January 29, 2004, 08:09:50 AM »
and also being able to add variable into the added variable
« Last Edit: December 31, 1969, 06:00:00 PM by DarkElite »
DarkElite

Dei vobem omniam proditiverunt.  Iam vobis quis deposcibitis sacrificium rersum vitae est!

DarkElite

  • Member
  • *
  • Posts: 1452
    • View Profile
    • http://cryosoft.mysticsoftware.net/Home.html
(no subject)
« Reply #2 on: January 29, 2004, 08:12:46 AM »
ex.
#crap$=cool
#finalvariable$=the+one+crap$+is+$
#Mwin(finalvariable$) *show "theonecoolis"
« Last Edit: December 31, 1969, 06:00:00 PM by DarkElite »
DarkElite

Dei vobem omniam proditiverunt.  Iam vobis quis deposcibitis sacrificium rersum vitae est!

Cesque

  • Member
  • *
  • Posts: 2178
    • View Profile
    • http://cesque.mysticsoftware.net
(no subject)
« Reply #3 on: January 29, 2004, 08:58:19 AM »
The second example works, the first one doesn't.

var+iable+! is not "variable!", though...

#code$ = "var"+"iable"+"!"+"=3"
#rpgcode(code$)

...works.

Variables are divided into literal($) and numeral(!) and one of them can't be added or subtracted to another one, if types don't match. Use #cast-xxx commands to turn variables between numeral and literal.
« Last Edit: December 31, 1969, 06:00:00 PM by Cesque »
TKGB cancelled Spyder.

Bastard.

Xorlak

  • Administrator
  • Member
  • *****
  • Posts: 2225
    • View Profile
    • http://darkagegames.net
(no subject)
« Reply #4 on: January 29, 2004, 07:31:19 PM »
Yep.  And to refine the second:

#crap$="cool"
#finalvariable$="theone"+crap$+"is"
#Mwin(finalvariable$) *show "theonecoolis"
« Last Edit: December 31, 1969, 06:00:00 PM by Xorlak »

DarkElite

  • Member
  • *
  • Posts: 1452
    • View Profile
    • http://cryosoft.mysticsoftware.net/Home.html
(no subject)
« Reply #5 on: February 03, 2004, 08:16:59 AM »
so for something like a shop, or item getting sorta thing could i do this?

Code: [Select]
#itm1$=potion
#castnum(itm1$,itm1!)
#itm1!=itm1!+1

would that cause potion! to go up? or only the itm1! variable?
« Last Edit: December 31, 1969, 06:00:00 PM by DarkElite »
DarkElite

Dei vobem omniam proditiverunt.  Iam vobis quis deposcibitis sacrificium rersum vitae est!

Cesque

  • Member
  • *
  • Posts: 2178
    • View Profile
    • http://cesque.mysticsoftware.net
(no subject)
« Reply #6 on: February 03, 2004, 10:34:00 AM »
No, only the variable. "potion" equals 0 as a number, so itm1! equals 0+1=1.

I don't get exactly what you want to do... Up the "potion"? Make it "potion2"?
« Last Edit: December 31, 1969, 06:00:00 PM by Cesque »
TKGB cancelled Spyder.

Bastard.

dooms102

  • Member
  • *
  • Posts: 59
    • View Profile
Re: +'ing To Make Variables?
« Reply #7 on: September 12, 2007, 09:41:23 PM »
ummm.... I think I know what you are doing. But doing that gets you nowhere leave that first literal variable alone. but also have a numeric variable of the same name for a counter. so instead of that just add or subtract from potion!
« Last Edit: December 31, 1969, 06:00:00 PM by Guest »
Quote Dragonminded:
"Please note that the microphone quality is something a few steps lower of microwaved ass, so don\'t expect production quality from this feature."

Dude Man

  • Member
  • *
  • Posts: 6393
    • View Profile
    • http://dmdgames.mysticsoftware.net//
Re: +'ing To Make Variables?
« Reply #8 on: September 13, 2007, 01:09:40 PM »
This topic was made before half the people who post here have even joined. I'm sure the problem is fixed and/or forgotten.
« Last Edit: December 31, 1969, 06:00:00 PM by Dude Man »
~Welcome back mysticsoftware.net??
The Black Walkway

D. Ein

  • Member
  • *
  • Posts: 1139
    • View Profile
Re: +'ing To Make Variables?
« Reply #9 on: September 13, 2007, 05:17:47 PM »
And the other half no longer post. Smile
« Last Edit: December 31, 1969, 06:00:00 PM by Guest »
!!!! , ...

—staring wildly up and down
the here we are now judgment day

cross the threshold have no dread
lift the sheet back in this way.
here is little Effie’s head
whose brains are made of gingerbread