error script attempt to index upvalue (a boolean value)

error script attempt to index upvalue (a boolean value)

Anonymous
Not applicable
2,342 Views
2 Replies
Message 1 of 3

error script attempt to index upvalue (a boolean value)

Anonymous
Not applicable

Hi,

 

 i am trying to play around rtsCamera @dan.matlack and iniitialized in Project.lua on_level_pre_flow.

 

function Project.on_level_load_pre_flow()

local level_name = SimpleProject.level_name
if level_name == nil or level_name ~= Project.level_names.menu then
RTS_Camera.init()

elseif level_name == Project.level_names.menu then
local MainMenu = require 'script/lua/main_menu'
MainMenu.start()
end
end

 

But getting some error.What could be the mistake that i am making.

 

 

 

 

error attached

 

 

Thanks

Reply
Reply
0 Likes
Accepted solutions (1)
2,343 Views
2 Replies
Replies (2)
Message 2 of 3

dan.matlack
Alumni
Alumni
Accepted solution

@Anonymous hello 🙂 did you define the local and are you including the rts_camera.lua file that was included in the rts camera project before your level pre flow function?

 

local RTS_Camera = require 'script/lua/rts_camera'

 

 

 

______________________________________
Dan Matlack
Senior Content Manager || Games Solutions
Autodesk, Inc.
Reply
Reply
Message 3 of 3

Anonymous
Not applicable

Hey @dan.matlack  

 

yes indeed my bad.. probably i am drunk enough to do the silly mistake ,

Spoiler
Spoiler
Smiley Frustrated

Did the same mistake

 

Thanks for the reply.

Reply
Reply