Game Development Community

Using the Export Function and strings

by Kevin Epps · in Torque Game Builder · 03/07/2007 (5:31 pm) · 0 replies

I'm trying to do the following:

Write values to file using export, but it doesn't work when the values are strings. Is this function not meant for strings?

Here's the code:

$gameplay::inputChooser = inputChooser.getValue();
      $gameplay::upChooser = upChooser.getValue();
      $gameplay::downChooser = downChooser.getValue();
      $gameplay::leftChooser = leftChooser.getValue();
      $gameplay::rightChooser = rightChooser.getValue();
      $gameplay::jumpChooser = jumpChooser.getValue();
      $gameplay::attackChooser = attackChooser.getValue();
      $gameplay::runChooser = runChooser.getValue();
      $gameplay::sheathChooser = sheathChooser.getValue();
      $gameplay::superChooser = superChooser.getVaule();
      $gameplay::magicChooser = magicChooser.getValue();
      export("$gamplay::*", "~/prefs/gameplayoptions.cs");

If all of these values were numbers(and it has to be all), then it works, but if any of them are strings, it won't work at all. It doesn't give me an error message or anything either.