English Some error with a specific script

6 replies
Goto Page
To the start Previous 1 Next To the start
Up
Accurator
User
Offline Off
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
01.09.15 08:37:52 pm
Up
JeeewNazi
User
Offline Off
Actually whats the aim of the script?
01.09.15 08:42:49 pm
Up
Accurator
User
Offline Off
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.
01.09.15 08:48:13 pm
Up
JeeewNazi
User
Offline Off
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.
01.09.15 09:20:58 pm
Up
Accurator
User
Offline Off
user JeeewNazi has written:
Ofcourse u wont get a solution unless u explain it,
Say whats actually wrong, whats not working,etc.

I actually did.

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

It's not.

user JeeewNazi has written:
I would take a look.

Hands off.
02.09.15 01:05:06 am
Up
Talented Doge
User
Offline Off
Die hook has written:
killer, victim, bla bla

So, you died by anyway except by players, the killer will be 0.

And it's killer, victim. Not victim, killer.
Talented Doge
02.09.15 12:25:21 pm
Up
Accurator
User
Offline Off
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.

Code:
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