Jump to content

...

13 hours ago, Yuriysama said:

snip

You created the variable but didn't assign it a value.
For instance you did

13 hours ago, Yuriysama said:

 


command = "buyfood"
description = "Buy food."
delay = 1.5

 

You may have never assigned a value to "buyfood"

 

OR.. your code above doesn't have a closing curly brace. If it is part of the buyfood error then that may be your other problem.

 

I have limited Lua knowledge but I know a bit of C++. (Lua was based off C++)

Link to comment
Share on other sites

Link to post
Share on other sites

On ‎1‎/‎3‎/‎2017 at 6:32 PM, Yuriysama said:

Hi fpo,

 

Thanks for your reply.

The command works when hungermod is enabled, I only get this issue when hungermod is disabled in DarkRP.

I've tried posting on facepunch but it seems nobody is able to diagnose the issue there either.

Hey I didn't see your reply. Try quoting me or putting the @ symbol before my name. For instance "@fpo"
I'll analyze your reply in a bit. I have a bit of a drive so if I don't finish my reply I'll send it later.

Link to comment
Share on other sites

Link to post
Share on other sites

On 1/3/2017 at 6:32 PM, Yuriysama said:

Hi fpo,

 

Thanks for your reply.

The command works when hungermod is enabled, I only get this issue when hungermod is disabled in DarkRP.

I've tried posting on facepunch but it seems nobody is able to diagnose the issue there either.

I'm going to need more code. In your question the phrase "hungermod" is nowhere to be found in code. 

If I were to guess there is a loop or control flow somewhere that checks if "hungermod" is disbled. For instance:
 

if (!hungermod) // also works as (hungermod = false) or (hungermod != true) or other varients. I don't know the Lua syntax but it should be similar
	then
		declareChatCommand();
end if

If the code works with hungermod enabled, then try and work your code so it stays enabled. 

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×