in reply to Trouble working with Config::Simple
I get the following error Can't call method "read" on an undefined value at kenesis.pl line 93, <STDIN> line 1.. The thing is all of my variables are definedsub load_game { $cfg->read("'$ENV{HOME}/.kenesis'"); @player = $cfg->param("player"); @enemy = $cfg->param("enemy"); $completed_quests = $cfg->param("quest"); $special_item = $cfg->param("items"); $class = $cfg->param("class"); #main_menu(); print "@player\n"; print "@enemy\n"; print "$completed_quests\n"; print "$special_item\n"; print "$class\n"; exit; }
.our @player; our $completed_quests = 0; our $special_item = "none"; our @enemy; our $class = "null"; our $cfg;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Trouble working with Config::Simple
by parv (Parson) on Jul 09, 2008 at 03:23 UTC | |
by vendion (Scribe) on Jul 11, 2008 at 21:23 UTC | |
by parv (Parson) on Jul 12, 2008 at 07:08 UTC | |
by vendion (Scribe) on Jul 13, 2008 at 02:15 UTC |