Forum

> > CS2D > Scripts > Some error with a specific script
Forums overviewCS2D overview Scripts overviewLog in to reply

English Some error with a specific script

6 replies
To the start Previous 1 Next To the start

old Some error with a specific script

Accurator
User Off Offline

Quote
FIXED. Apparently victim and killer IDs were reversed? cs2d.com says it's victim and then killer, but i've used parse to msg the ids of both, and they are indeed reversed. Is this because of the new update, perhaps?
edited 1×, last 02.09.15 12:39:23 pm

old Re: Some error with a specific script

Accurator
User Off Offline

Quote
If you really want the "aim", it's zombie survival. And not that trash where noobs get RPGs and kill millions of zombies for "ammo points". And I don't see how telling you this helps me.

old Re: Some error with a specific script

Ajmin
User Off Offline

Quote
Ofcourse u wont get a solution unless u explain it,
Say whats actually wrong, whats not working,etc.
Also say if it is a private zm script if not send me the link,
I would take a look.

old Re: Some error with a specific script

Accurator
User Off Offline

Quote
user Ajmin has written
Ofcourse u wont get a solution unless u explain it,
Say whats actually wrong, whats not working,etc.

I actually did.

user Ajmin has written
Also say if it is a private zm script if not send me the link,

It's not.

user Ajmin has written
I would take a look.

Hands off.

old Re: Some error with a specific script

Accurator
User Off Offline

Quote
I see.
The problem is pretty much fixed, but there still is an error.
I'm pretty sure it's the function that kills players if their HP stat is 0 or lower.

1
2
3
4
5
6
7
8
9
10
11
if stat == "health" then
	if getStat(id, 'health') <= 0 then
		setStat(id, 'health', getStat(id, 'maxhealth'))
		if not itemtype == nil then
			parse('customkill '..source..' '..itemtype(wpn, 'name')..' '..id)
		else
			parse('customkill 0 "NPC" '..id)
		end
	end
	updateHud(id, stat, 1, 24, 240)
end

This is what I made of it now. Apparently the item type is "no kill message" (value 250)
The problem might not be about the health stat, more like the maxhealth stat? Not sure about that, tho. And the spawn function DOES work if you do the same in it as in the die func... I could try removing the adding of health there.

EDIT: The problem definitely is in the die function. I removed it and theres no error anymore, plus the spawn function has the exact same use. It might very well be possible that the ID is the problem...
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview