2 problems

Posted by Gorock on Thu 27 Oct 2005 02:04 AM — 10 posts, 36,255 views.

#0
ok the first problem i have is if i get a piece of eq and set it to cast a spell on someone when they wear it when they log off and back on the spell number sets to 0 and then when they wear it a bug says

Log: [*****] BUG: APPLY_WEARSPELL trying to apply bad target spell. SN is 0.

the second problem i have is that when i reboot the mud it says segmentation fault (core dumped) and i dont see anything in the logs or anywhere as to whats causing it



any help thanks in advance
USA #1
What spell are you setting on the item? Is the item installed?

When the core is dumped, use gdb to debug it.
#2
the spell is indignation sn 102 and the area with the item is installed i have another coder working on the dump bit
Australia #3
There are 2 numbers used with all spells, SN and Slot, objects are written to area files with the slot numbers not skill numbers.

Also you need to make sure that all the spells have unique slot numbers, if 2 have the same then the code will default to the spell first in the skills.dat file.

Oh one last point, SN 0 is reserved.

Sn:    0 Slot:   95 Spell: 'reserved            '
Saves: none  SaveEffect: none
Type: Spell  Target: ignore  Minpos: 12  Mana: 0  Beats: 0  Range: 0
Flags: 0  Guild: -1  Value: 0  Info: 0  Code: spell_null
Sectors Allowed: All
Dammsg: 
Wearoff: ???
--------------------------[CLASS USE]--------------------------
Cit) lvl: 101 max: 95%  
Amended on Thu 27 Oct 2005 09:47 AM by Robert Powell
#4
it seems that some spells save and some dont if i type oset helm affect wearspell benediction then save and quit then log on it is still there but if i type oset helm affect wearpsell indignation then log off and back then its gone is there somewhere that saves the spells and maybe indignation isn't set to save
USA #5
Are you remembering to save the area? And also making sure the item was prototype before adding the wearspell?
#6
im not trying to do it like that i am just trying to make the one item with that spell as a quest reward some spells stay and some dont i also made a completely new item saved it and the spell still disappeared i folded the area and set it while it was prototype
USA #7
Can you tell me exactly what you are doing? I'll try to reproduce it.
Australia #8
I know what im about to say is going to aimed to the ultra newbie, but my own builders all seem to have problems like this when they work on non proto areas.

aassign <area filename>
oinvoke <ovj vnum>
oset <obj vnum> on
flags prototype
folda <area filename>
slookup <spell name>
affect wearspell <Skill Number>
flags prototype
done
folda <area filename>

Doing it this way i have never had a problem of anything not not being saved.

#9
that is how i am doing it but there are a few spells that dont stick and im not sure why maybe its not saving in the code ill take a look