if(1)
var/dice = "3d6"
var/H = roll(dice)
{firebonus+=1;manabonus+=H;value+=rand(1,25)}
Basically, I'm calling the item level. If it is level 1, this happens. But it says this is an invalid expression. I'm pretty sure it has something to do with that H var trying to be added to manabonus, but I'm not sure how to fix it.
|
Aug 11 2012, 4:50 pm
Best response
|
|
Get rid of the curly braces. You don't use those in DM unless they're around a code block, and you can't make your own sub-blocks.
|
Cool, no more compile error but i don't have a way to check item stats in the game yet so I'll see if it worked later. Thanks for the help.
|
In response to Kaiochao
|
|
The brackets aren't the issue; the placement is.
if(l){ var/first="first"; var/second="second"; third++; ect; } Works just fine. Infact; I use this method to condense my codes once I feel they are complete. [EDIT] The condensing does make it rather dificult to read for those less experianced. Deffently harder to debug. [END EDIT] |
In response to NNAAAAHH
|
|
Thanks!
|