ID:146531
 
I have this Problem and when i go to compile here are the errors i get

attacks2.dm:21:error: 0: expected end of statement
attacks2.dm:22:error: expected expression

One line 21 i get

            del(src)0 //var to hold how much PL the eater gets


On line 22 i get


        var/cookieName //var to hold the name of the person you're eating


Thanks in advance
del(src)
return 0


var/cookieName = ""

try that
In response to Zmadpeter
Zmadpeter wrote:
del(src)
return 0

try that

That won't work, since del(src) will immediately end the current proc.

What you need instead is a soft delete, either by using spawn() or by setting all references to null. For example, if nothing else is holding onto this object (not physically mind you, but holding any reference to it), then loc=null will be enough to delete it automatically when the proc is over. If this form of deletion is not an option because you can't predict whether there will be other references, try this:

spawn(1) del(src)
loc = null
return 0


Alternatively, you could take another route.

var/A = src
src = null
del(A)
return 0


One the proc's src is set to null, it should keep running when the object is deleted.

Lummox JR