The receiver shouldn't be `nil` stack traceback:

i need to start my level and it give me this error

ERROR:SCRIPT: main/main.script:28: The receiver shouldn’t be `nil`
stack traceback:
[C]:-1: in function post
main/main.script:28: in function <main/main.script:15>

this is my code in main

    local data = require(“main.data”)

    function init(self)
    msg.post(".", “acquire_input_focus”)
    msg.post("@render:", “use_fixed_fit_projection”, { near = -1, far = 1 })
    – seed random number generator
    math.randomseed(os.time())
    math.random()
    – message the render script to set the background color
    msg.post(’@render:’, hash(‘clear_color’), {color = data.bg_color})
    –load the start collection
    msg.post(‘go#start’, ‘load’)
    end

    function on_message(self, message_id, message, sender)
    if message_id == hash(‘show_game’) then
    if data.state == data.STATE_START then
    msg.post(“go#start”, “unload”)
    else
    msg.post(“go#gameover”, “unload”)

    ```
    	end	
    	msg.post("go#game", "unload")
    elseif message_id == hash('show_gameover') then
    	msg.post("go#game", "unload")
    	msg.post("go#gameover", "load")
    elseif message_id == hash('proxy_loaded') then
    	msg.post(sener, 'enable')

    end
    

    end 

please help

Look at line 28 (as stated in the error message).
Then you’ll find your typo sener.

1 Like

what is the problem there it’s correct

what do i need to do i am new to the engine

It’s a typo.
You wrote sener, but the argument is called sender

6 Likes

@OURABIG: I noticed that you posted about this issue here, on Discord and on Twitter. There’s not really anything wrong with that, but it is usually enough to post your question here.

The forum is monitored throughout the day (CET timezone) by the members of the Defold team. We or some other forum member usually answer quickly to any question posted.

Asking the question on Discord is also ok as there are many active users on Discord that can help.

We (Defold team) do not give support on Twitter. It’s not a very good medium for end user support. And it is not very searchable for anyone looking for solutions to already solved problems.

3 Likes