So I was trying to compile the coding for a wolf-centered game I'm making.
Then I got a compilation error. At first there were 10, but I managed to fixed them. There are still 2 left, though, and I can't figure out what they mean.
It says:
error: Wolf: missing comma ',' or right-paren ' )'
and this one:
error: unbalanced )
Oh. I wasn't sure where to put the thread... The developer help and BYOND help forums seem the same to me :/
I can't find a single line where I put just "Wolf" instead of "Timberwolf" or "Timber Wolf". Or did it mean the word "Wolf" when it came after the word "Timber?" I don't get it... Could you explain it in layman's terms? I just got BYOND about a week ago so I'm more used to a different programming language... EDIT: Nevermind, I think I get what you're saying now after re-reading your post. |
Errors are typically at or a few lines above the reported line. Always use that as a reference for debugging. But, there are cases where it can be below which are extremely rare. So rare I couldn't even give you an example. I just know I've seen them before. Did you solve your problem? If so, good luck with developing!
|
This type of mistake is often made when people put functions inside if() statements, so you may want to look there. Perhaps any lists that you made, or calls to new.
For example var/mob/wolf = new(locate(1,1,1) is incorrect, as the end parenthesis is missing. |
Oh, I get it now.
I'll go look for the error.... EDIT: I thought I found it, so I fixed it, but it's still giving me an error message. Then again, it did say there were 2 errors, not just one... |
WolfOfTheForest wrote:
Oh, I get it now. Paste the error and the script at that location. Try to solve it yourself and I can tell you what you've done right, wrong, or just plain missing. |
You mean, copy and paste the error into the box of text where it says there are compilation errors?
Could you rephrase that? |
Example:
Errors - WolfGame.dme error:line 94: missing parenthesis or comma. 1 error 0 warnings line 90 code Like that. To get line numbers to show up on the left of your DM program, press CTRL+L. 4 lines before and 4 lines after should be enough. To get it in that white box, wrap it in dm tags. Which is pretty much... well.. I'm on mobile and don't know the ASCII for it. Just think HTML and put the less than and greater than sign around the letters DM and then to end it off it is /DM. |
Ah! I found the code it was giving a compilation error. It was one for a wolf who's become a Medic to have an oak leaf necklace as an overlay.
This is the code: mob/Medic/Overlay(Oak Leaf Necklace) Am I typing it right? |
That isn't valid syntax. To add an overlay, add to the overlays list.
var/mob/M = new() Though generally you'd want to keep the overlay in a variable somewhere. Also, is Oak Leaf Necklace supposed to be an object? A string? |
His code isn't to be taken literally. It's an example. In your case, I assume you have an npc of type mob/Medic? If so, the npc has a variable called overlays. If you already created the npc, just grab the NPC however you can and add it to a variable like so.
var/mob/Medic/M = wherever you can access the medic npc. M is the name of the variable. Sorry, on mobile. |
It was supposed to be a rank that your wolf can earn. You know, sort of like leveling up, but without the levels?
I think I get it now... I'll try to fix it. EDIT: It's giving me all of these errors now... Someone please explain? loading Timberwolf.dme Timberwolf.dm:190:error: bad argument definition Timberwolf.dm:195:error: bad argument definition Timberwolf.dm:200:error: bad argument definition Timberwolf.dm:218:error: bad argument definition Timberwolf.dm:252:error: store: expected end of statement Timberwolf.dm:254:error: restore: expected end of statement Timberwolf.dm:425:error: mob: expected end of statement Timberwolf.dm:516:error: missing expression Timberwolf.dm:527:error: missing expression Timberwolf.dmb - 9 errors, 0 warnings |
We can't really tell you what is wrong unless you show us those lines. (See Xirre's post above.)
|
Look on that line, or above that line; you forgot a comma or closing parenthesis somewhere.