Skip to content

Instantly share code, notes, and snippets.

@PoppyWorks
Last active July 27, 2018 02:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save PoppyWorks/3a96761262de98e2420a1bfe0e086b2f to your computer and use it in GitHub Desktop.
Save PoppyWorks/3a96761262de98e2420a1bfe0e086b2f to your computer and use it in GitHub Desktop.
GML Script. A basic multi-level wrapper for the debug/message system used in Gamemaker Studio. Alert will be seen throughout our samples here. When shipping, you can comment the entire script out easily!
///alert(level[0 to 3],message)
var level = argument0;
var text = argument1;
{
switch (argument0)
{
case 0: show_debug_message("DEBUG: "+text); break;
case 1: show_debug_message("ERROR: "+text); break;
case 2: show_message("ALERT: "+text); break;
case 3: show_error("CRITICAL ERROR: "+text,false); break;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment