# loadVariables from .txt simple problem

**URL:** https://forum.kirupa.com/t/loadvariables-from-txt-simple-problem/66824
**Category:** flash
**Created:** [October 9, 2004, 4:02pm UTC](https://forum.kirupa.com/t/loadvariables-from-txt-simple-problem/66824 "2004-10-09T16:02:10Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![larsappinf](https://avatars.discourse-cdn.com/v4/letter/l/eada6e/32.png) [@larsappinf](https://forum.kirupa.com/u/larsappinf)
#### Post date: [October 9, 2004, 4:02pm UTC](https://forum.kirupa.com/t/loadvariables-from-txt-simple-problem/66824/1 "2004-10-09T16:02:10Z")

</div>

I am trying to load a variable from a text file named “variable\_file.txt”

The variable in the file is “var” and I am trying to assign the word “value”

When I run the following code:

```auto
 loadVariablesNum("variable_file.txt", 0);
trace(var);

```

I get the following:

Scene=Scene 1, Layer=Layer 1, Frame=1: Line 2: Unexpected ‘!’ encountered  
trace(var);

other times I have tried this I get “undefined”

I’m sure there is something basic I am missing here, but what???

thanks in advance,

lars
