ID:144756
 
Code:
// DM Environment file for BoBoBo ONLINE!.dme.
// All manual changes should be made outside the BEGIN_ and END_ blocks.
// New source code should be placed in .dm files: choose File/New --> Code File.

// BEGIN_INTERNALS
// END_INTERNALS
// BEGIN_FILE_DIR
#define FILE_DIR .
// END_FILE_DIR

// BEGIN_PREFERENCES
// END_PREFERENCES

// BEGIN_INCLUDE
#include "Bobobo online!.dm"
#include "Tuitorial Grove.dmp"
// END_INCLUDE


Problem description: This is my DME code. When I try to compile, I get these error messages:
BoBoBo ONLINE!.dme:15:error: expected expression
BoBoBo ONLINE!.dme:19:error: unbalanced }

It didn't give me the messages until I made my leveling system, which looks like this:
mob/proc/Levelcheck
if(src.exp>=1000)
src.exp = 0
src.level+1
src.toughness+"1d3"
src.max_vitality+"1d3"
src.protection+"1d3"
src.precision+"1d3"
src.swiftness+"1d3"
src.recovery+"1d3"
src.max_endurance+"1d3%"
"You have gained a level!"
HELP!

Yours:
mob/proc/Levelcheck
if(src.exp>=1000)
src.exp = 0
src.level+1
src.toughness+"1d3"
src.max_vitality+"1d3"
src.protection+"1d3"
src.precision+"1d3"
src.swiftness+"1d3"
src.recovery+"1d3"
src.max_endurance+"1d3%"
"You have gained a level!"

Problem Fixed:
mob/proc/Levelcheck()
if(src.exp>=1000)
src.exp = 0
src.level+=1
src.toughness+="1d3"
src.max_vitality+="1d3"
src.protection+="1d3"
src.precision+="1d3"
src.swiftness+="1d3"
src.recovery+="1d3"
src.max_endurance+="1d3%"
src<<"You have gained a level!"

Common mistake, even I do it.
Add () after mob/proc/Levelcheck
ALSO, avoid:

src.var+amount

either have src.var++ for adding 1
or +=

also your announcment to your player wont work. you need to make dream maker understand that it should be sent TO that person.

src, being the person and << being the sign that tells dream maker to SEND the string to you which is "You leveld up or whatever"
thus being src<<"You leveld up or whatever"

i dont understand the concept of +="1d3", I'm pretty sure that since its a string and not a value, youll end up with the person's variable equaling "1d31d31d31d31d31d3" after leveling up so many times
In response to Jay1
mob/proc/Levelcheck
if(src.exp>=1000)
src.exp = 0
src.level+1
src.toughness+"1d3"
src.max_vitality+"1d3"
src.protection+"1d3"
src.precision+"1d3"
src.swiftness+"1d3"
src.recovery+"1d3"
src.max_endurance+"1d3%"
"You have gained a level!"

your using the dice roll 1d 3sides

so remove the "" as its not a string
and change it to

src.toughness += roll("1d3")


that will give the effect of randomish stat changes when the player levels.
In response to Zmadpeter
That just gave me 4 errors.
In response to Snapboy300
src.toughness += roll("1d3")
mob/var/roll = ""