• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Custom vocation keeps changing back.

dangerangel2140

New Member
Joined
Jul 30, 2009
Messages
8
Reaction score
0
Problem: I set a character's vocation ID to that of a custom vocation ID, 21. Afterwards I'll load up the server and the character's vocation is correct, ID 21. Once I close the server, however, and open it back up later, the character's vocation ID reverts back to 1.

My assumption: Could this be because I currently have no vocation for ID 0?

Code:
[14/08/2009 13:50:57] [Warning - Vocations::getVocation] Vocation 0 not found.
[14/08/2009 13:50:57] [Warning - Chat::loadFromXml] Wrong vocation id: 0



Sorry if I posted this in the wrong thread, but "Requests and Support" sounded logical. Thanks for any help~

Edit: Apparently the same thing happens if the character dies.
 
Last edited:
I had the same problem too.
But sadly, i dont remember how I fixed it. LOL

But from memory I think its something with the Database.. (phpmyadmin..)

Not sure tho.

:/.
 
Lua:
doPlayerSetPromotionLevel(cid, 1) -- Sorcerer
doPlayerSetPromotionLevel(cid, 2) -- Master Sorcerer
doPlayerSetPromotionLevel(cid, 3) -- Epic Master Sorcerer

Example:
Lua:
local vocs = { 1, 2, 3, 4 }
function onUse(cid, item, fromPosition, itemEx, toPosition)
	if(doPlayerRemoveMoney(cid, 20000) == true) then
		if(getPlayerVocation(cid, vocs) == true) then
			doPlayerSetPromotionLevel(cid, 2)
			doPlayerSendTextMessage(cid, 22, 'You have been promoted.')
		else
			doPlayerSendCancel(cid, 'You have already been promoted.')
		end
	else
		doPlayerSendCancel(cid, 'You do not have enough money.')
	end
	return true
end
 
Back
Top