Topic: Newbie struggling with message box syntax
SandJ![]() Topic Opener |
Posted at:
Yesterday 20:45 UTC+2.0
I am trying to get the hang of scripting and want to use one of my favourite debugging techniques: a pop-up box at start and end of each function so I can trace what is happening. But I can't work out how to use send_to_inbox or message_box or campaign_message_box. I either get an error about trying to index a string or index a number null values or an outright crash saying "FATAL ERROR: Received signal 11 (Segmentation fault)" I have tried using:
and various forms of:
and also wl.game.Player.message_box() and player:message_box() without success. Q1. Is there a better way to trace program execution than pop-ups for the start and end of programs and functions? Q2. Can someone point me at an example of working code for inclusion in an init.lua that provides that sort of functionality? Yes, I have tried looking at the wiki and at existing scripts, but cannot work out what I am getting wrong, despite spending about four hours on just this one thing.
Edited:
Yesterday 20:49 UTC+2.0
![]() ![]() |
SandJ![]() Topic Opener |
Posted at:
Yesterday 22:14 UTC+2.0
gives me "attempt to index a nil value (global 'game')"
gives me "attempt to index a nil value (global 'game')"
crashes with "FATAL ERROR: Received signal 11 (Segmentation fault)"
crashes with "FATAL ERROR: Received signal 11 (Segmentation fault)"
crashes with "FATAL ERROR: Received signal 11 (Segmentation fault)"
gives me "attempt to index a number value (local 'player'"
gives me "attempt to index a string value (local 'message')" and so on.
Edited:
Yesterday 22:14 UTC+2.0
![]() ![]() |
SandJ![]() Topic Opener |
Posted at:
Yesterday 23:30 UTC+2.0
I have tried:
from the Scenario Tutorial, but that causes a "FATAL ERROR: Received signal 11 (Segmentation fault)" crash. ![]() ![]() |