Page 1 of 1

New class help

Posted: Thu Feb 16, 2012 2:26 pm
by joni
I created a rogue mage class, but after i put it in, ToME wont work. :o
ive attatched the file, could u tell me wats wrong?
it wouldnt work in .lua, so i pasted it into a word document. i havent changed any of the other scripts yet, so i think thats the problem

Re: New class help

Posted: Thu Feb 16, 2012 3:17 pm
by yufra
joni wrote:I created a rogue mage class, but after i put it in, ToME wont work. :o
ive attatched the file, could u tell me wats wrong?
I don't see the attachment. Only certain extensions are allowed to be attached, so maybe you need to rename it? Also, I suggest hanging out on the IRC channel (#tome on irc.rizon.net) for more immediate help. Cheers!

Re: New class help

Posted: Fri Feb 17, 2012 7:57 am
by marvalis
You need to debug your code :3.

Run the game from terminal it will show you what is going wrong.

Re: New class help

Posted: Sun Feb 19, 2012 4:15 am
by marvalis

Code: Select all

Lua Error: /engine/Birther.lua:46: /engine/utils.lua:1004: /data/birth/classes/mage.lua:34: '}' expected (to close '{' at line 29) near 'Mage'
	At [C]:-1 
	At [C]:-1 error
	At /engine/Birther.lua:46 loadDefinition
	At /mod/load.lua:260 
	At [C]:-1 require
	At /engine/Module.lua:158 load
	At /engine/Module.lua:541 instanciate
	At /engine/utils.lua:1214 showMainMenu
	At /engine/init.lua:123 
	At [C]:-1 dofile
	At /loader/init.lua:170 

Code: Select all

		subclass =
		{
			__ALL__ = "disallow",
			Alchemist = "allow",
			Archmage = "allow",
			Necromancer = "allow",
			Outcast Mage = "allow"
		},
You have to use: ["Outcast Mage"] = "allow",

You also missed a bunch of commas in the birth description.
Here is a working file:
http://pastebin.com/4N25MfsQ