• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!
  • 2026 staff recruitment is open! Check it out and consider applying!

Lua WTF happen to my refin system?

gmstrikker

Well-Known Member
Joined
Jul 30, 2014
Messages
458
Solutions
1
Reaction score
50
Its work fine... 2 hours play and not work...
I need to restart server, and back to play with my brother...

Few times latter... Bug again, needed to restart server to back to normal... What is it?

Error:
Code:
[23:57:13.709] [Error - Action Interface]
[23:57:13.709] data/actions/scripts/upgrade.lua:onUse
[23:57:13.709] Description:
[23:57:13.709] data/lib/upgradesystem.lua:108: attempt to index a boolean value
[23:57:13.709] stack traceback:
[23:57:13.710]  data/lib/upgradesystem.lua:108: in function 'refine'
[23:57:13.710]  data/actions/scripts/upgrade.lua:12: in function <data/actions/scripts/upgrade.lua:1>

[23:57:19.666] [Error - Action Interface]
[23:57:19.666] data/actions/scripts/upgrade.lua:onUse
[23:57:19.666] Description:
[23:57:19.667] data/lib/upgradesystem.lua:108: attempt to index a boolean value
[23:57:19.667] stack traceback:
[23:57:19.667]  data/lib/upgradesystem.lua:108: in function 'refine'
[23:57:19.667]  data/actions/scripts/upgrade.lua:12: in function <data/actions/scripts/upgrade.lua:1>

[23:57:28.575] [Error - Action Interface]
[23:57:28.575] data/actions/scripts/upgrade.lua:onUse
[23:57:28.575] Description:
[23:57:28.575] data/lib/upgradesystem.lua:108: attempt to index a boolean value
[23:57:28.575] stack traceback:
[23:57:28.575]  data/lib/upgradesystem.lua:108: in function 'refine'
[23:57:28.575]  data/actions/scripts/upgrade.lua:12: in function <data/actions/scripts/upgrade.lua:1>

[23:57:43.396] [Error - Action Interface]
[23:57:43.397] data/actions/scripts/upgrade.lua:onUse
[23:57:43.397] Description:
[23:57:43.397] data/lib/upgradesystem.lua:108: attempt to index a boolean value
[23:57:43.397] stack traceback:
[23:57:43.397]  data/lib/upgradesystem.lua:108: in function 'refine'
[23:57:43.397]  data/actions/scripts/upgrade.lua:12: in function <data/actions/scripts/upgrade.lua:1>

[23:57:45.493] [Error - Action Interface]
[23:57:45.493] data/actions/scripts/upgrade.lua:onUse
[23:57:45.493] Description:
[23:57:45.493] data/lib/upgradesystem.lua:108: attempt to index a boolean value
[23:57:45.493] stack traceback:
[23:57:45.493]  data/lib/upgradesystem.lua:108: in function 'refine'
[23:57:45.493]  data/actions/scripts/upgrade.lua:12: in function <data/actions/scripts/upgrade.lua:1>
 
Last edited:
Script of the error
Where the error appears
Line number
Data passed which caused the error
The error
The function of where it started

[23:57:45.493] [Error - Action Interface]
[23:57:45.493] data/actions/scripts/upgrade.lua:onUse
[23:57:45.493] Description:
[23:57:45.493] data/lib/upgradesystem.lua:108: attempt to index a boolean value
[23:57:45.493] stack traceback:
[23:57:45.493] data/lib/upgradesystem.lua:108: in function 'refine'
[23:57:45.493] data/actions/scripts/upgrade.lua:12: in function <data/actions/scripts/upgrade.lua:1>

Now you have a better idea of how to read the error. :)
 
Script of the error
Where the error appears
Line number
Data passed which caused the error
The error
The function of where it started

[23:57:45.493] [Error - Action Interface]
[23:57:45.493] data/actions/scripts/upgrade.lua:onUse
[23:57:45.493] Description:
[23:57:45.493] data/lib/upgradesystem.lua:108: attempt to index a boolean value
[23:57:45.493] stack traceback:
[23:57:45.493] data/lib/upgradesystem.lua:108: in function 'refine'
[23:57:45.493] data/actions/scripts/upgrade.lua:12: in function <data/actions/scripts/upgrade.lua:1>

Now you have a better idea of how to read the error. :)

Oh ty its was so usefull to me, i fix a talkaction error looking at this

But not this script...

You're trying to get "success" when if obj:refine(cid, item) returns true or false.

Where? This script is to hard to me, i dont made it, i just tryng to use...
 
Omni Cloud literally told you EXACTLY how to find your error, and I told you what was returning the error.
Learning things yourself is the best experience that way YOU understand it completely.
 
I'll try to explain it 'noobish'.
Code:
local status = obj:refine(cid, item)
if status == "success" then
This part defines status as obj:refine(cid, item) .. which returns to the script a true or false response. (I'm assuming.)
Again assuming, true = 1, and false = 0.
When the next line asks if status is equal to the string value, "success", it throws an error, as the script is expecting to receive a boolean value (aka number), aka true/false, response.

The same as you, I have no idea how to fix the issue, I'm just assuming I know how the issue is occuring, and once you understand the issue, you can usually research and debug the issue from there.

Good luck?

Xikini
 
the problem is:
i don't know when this error show
its happen 2 times
so i don't know how to test how to fix

its not happen again with no changes...
 
the problem is:
i don't know when this error show
its happen 2 times
so i don't know how to test how to fix

its not happen again with no changes...
To see what is going on in the script we (or you do at least) need to know what value is being returned.

Most things in lua return a value, even variables, this is how we are able to compare or assign values to something else.
Code:
local status = obj:refine(cid, item)
if status == "success" then
obj:refine returns a value and stores it in status, that in-turn compares its return value with a string "success".
To determine what status holds, lets see the return value and its type, this is where print comes in.
Code:
print(status)
If we want to see the data-type the value it returns, we would use type.
Code:
print(type(status))
We can also combine the two, if you are printing a value it is always called after the value is assigned.
Code:
local status = obj:refine(cid, item)
print(status, type(status))
Let us know what you get, you will see something printed in the console window when this script is executed.
 
Back
Top