Page 1 of 1

Spawn is a nil value.

Posted: Thu Jun 18, 2015 12:32 am
by JesterHoro
I have looked everywhere/googled all my questions regarding this issue with console commands.

I don't know how to fix it. Help?

Ex:
Say I want to spawn myself a gold key.

I would type the following in;
spawn(gold_key)

No matter how many times I try to 'spawn' one in, the message ALWAYS comes up for;

[string "user-input"]:1: attempt to call method 'spawn' (a nil value).

Am I doing something wrong? My game is up-to-date. So I wouldn't think that would be the issue... As I also have enabled console commands. (Because party.party:heal() works with no issues.)

Help?

Re: Spawn is a nil value.

Posted: Thu Jun 18, 2015 12:59 am
by Dr.Disaster
If you want to spawn something, put it in quotes -> spawn("gold_key")

Re: Spawn is a nil value.

Posted: Thu Jun 18, 2015 2:07 am
by JesterHoro
Oh.. It worked now. Thanks! :D

Re: Spawn is a nil value.

Posted: Mon Jun 22, 2015 5:14 pm
by Isaac
JesterHoro wrote:Oh.. It worked now. Thanks! :D
The reason it worked, is because "gold_key" ~in quotes, is a data value that corresponds to the name of a defined object that can be spawned; where as just gold_key ~without the quotes, is interpreted as a variable name, and one that is currently a nil value in your script environment.