Jump to content

Search the Community

Showing results for tags 'mdscript'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • No Mans Land
    • General Forum
    • Questions and Answers
    • Public Council
    • Say hello, Goodbye, or something else
    • New Player Roles and Legends
    • Contests, Quests and Adventures
    • Offtopic
    • Magicduel Centralised Market
    • Underground
    • Groups and Factions
  • MagicDuel Archive Lands
    • Archives on Magic and secret stuff
    • Local Legends
    • Bestiary
    • Historic Documents
    • MD Artworks (former Artisans Guild)
    • The Archivists
    • Legend Speakers
  • Marind's Bell
    • Marind Bell Citizen Forum
    • Historic Documents
    • The Seekers of Enlightenment
    • Knights of the Bell
    • Old Town Creature research
    • Water Dowsers
  • Loreroot
    • Loreroot in general
    • Historic Documents
    • Guardians of the Root
    • Children of the Eclipse
    • The Crafters
    • Woodcutters Guild
    • Wild Creatures Taming
  • Golemus Golemicarum
    • Golemus
    • Kelle'tha Order
    • Guerrilla Golemicarum
    • Creatures of the Island
    • MR's Fraternity
    • Lair Keepers
  • Necrovion
    • Necrovion Lair
    • Historic Documents
    • Abominable Creature Mutations
    • Necrovion Sentinels
    • Tainted Warriors
  • The Tribunal
    • General Discussion
    • Diplomatic Relations
    • Historic Documents
    • The Caretakers
    • Seal Of Six
    • Soldiers Of The Inner Sun
    • The Advertisers
    • Treasure Keepers
  • Labyrinth
  • Game development

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Playername

Found 1 result

  1. Debugging Your Code Debugging is not some weird activity programmers do...well it is but if you want to do interesting things with MDScript you have to know about it. Seeing what is inside the variables you are working with is very important to understand what you should do with them next. Simple variables are easy to check, you just output them and see what value they have: print @va; (i usualy use 'echo' instead of 'print' , they do same thing, but print sounds easier to remember) Best practice is to put some other value next to the one you are looking for, so that if the variable is empty, you will see that and not just an empty page not knowing if it was output or not. print "V=".@va; This will output V=something or V= if @va has no value. Better than nothing at all. Arrays are harder to debug by just using simple output. Multidimensional arrays are even worse. Fortunately there are functions to help you see exactly what is inside a variable. Debug Function: debug(variable,label); Parameters: variable = any kind of variable simple or multidimensional array with or wihout data label = a label to help you identify the debug output, optional (means you can use just the variable parameter) debug(@va); This will be your best friend when trying to understand what data you have in all those variables. It will generate a nice colored box with all the details you need about the internal structure of the variable you are trying to analyze
×
×
  • Create New...