Stuck... variable problem

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • TimeSurfer
    Forum Member
    • Dec 2007
    • 479

    Stuck... variable problem

    guys lol i feel so stupid i cant remember how to escape characters correctly to get the variable that is highlighted in red to work. i keep an error 'attempt to call global test2 [a string value] and i figure its because im not escaping correctly or something.

    Code:
    test2 = INIFile.GetValue("AutoPlay\\Docs\\ini\\conf.ini", "IRC", "nick");
    tests = TextFile.ReadToString("AutoPlay\\Docs\\HeavyApplet.html");
    tests2 = String.Replace(tests, "<param name=\"nick\" value=\"SCDLR\">", "<param name=\"nick\" value=\""..[COLOR="Red"]test2[/COLOR]"\">", false);
    TextFile.WriteFromString("AutoPlay\\Docs\\HeavyApplet2.html", tests2, false);
    the format im trying to force would look like this is if the variable test2 was set to SCDLR that is

    <param name="nick" value="SCDLR">

    any help would be appreciated.
  • Ulrich
    Indigo Rose Staff Member
    • Apr 2005
    • 5130

    #2
    Hello,

    couldn't it be that there is a concatenation missing? I think that there should be an additional ".." right after the variable in red. Like this:

    tests2 = String.Replace(tests, "<param name=\"nick\" value=\"SCDLR\">", "<param name=\"nick\" value=\"" .. test2 .. "\">", false);

    Cheers,
    Ulrich

    Comment

    • TimeSurfer
      Forum Member
      • Dec 2007
      • 479

      #3
      ahhh lol now i really feely silly thanks bro appreciate it

      Comment

      Working...
      X