Jump to content

Script classname not found


tipforeveryone
 Share

Recommended Posts

I attached this script to a Directional light

function Script:Start()
  sun = self.entity
end

Game started normally, but When I changed the changemapname variable (which can be found in Main.lua) to another map which also had the same Scripted Directional light. I recieved this "Script classname sun not found."

Is there something wrong with global variable ?

Edit: It seems my global variables were "stuck" when I change map. Is there anyway to RESET or RELEASE everything ? everytime I load a map, I want everything is clean. World:Clear() does not work well I think

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...