[FilterScript] Real Weapon Damage 1.1
#1

Okay.
Im it again and i updated my Real Weapon Damage. [NO its to bugged]
btw. You need to have the Include OnPlayerShootPlayer...



Download:

version 1.0 : http://uploaded.to/file/c6b8td

Pastebin:

version 1.0 : http://pastebin.com/6aJH2PZc

I big thank you again at Double-O-Seven s
OnPlayerShootPlayer function.
Reply
#2

Fail in code, but okey. 3/6
Reply
#3

where is fail could you say it to me im new in scripting
Reply
#4

Nice,but your unorganised :P
It's ok anyway xD
Reply
#5

The first problem I saw is this:

pawn Код:
if(GetPlayerWeapon(shooter) == 29 || 31 || 30)
You cannot compare it that way, pawn will read it like this:
pawn Код:
if(GetPlayerWeapon(shooter) == 29)
OR
if(31)
OR
if(30)
As 31/30 are not 0, pawn reads them as true, so this line will always be true.
You will have to do it this, change all matching ifs:

pawn Код:
if(GetPlayerWeapon(shooter) == 29 || GetPlayerWeapon(shooter) == 31 || GetPlayerWeapon(shooter) == 30)
Dont know if there are other mistakes, but this is the most fatal one, as the used weapon is not detected correctly.

But however, nice work. Tons of "pro scripters" dont manage it to create something like this, and whine in the request thread, but you as a beginner just made it on your own. Keep it up!
Reply
#6

okay ty
Reply
#7

pawn Код:
C:\Documents and Settings\Matz\Desktop\realhit.pwn(40) : error 025: function heading differs from prototype
C:\Documents and Settings\Matz\Desktop\realhit.pwn(43) : warning 219: local variable "armour" shadows a variable at a preceding level
C:\Documents and Settings\Matz\Desktop\realhit.pwn(45) : warning 219: local variable "health" shadows a variable at a preceding level
C:\Documents and Settings\Matz\Desktop\realhit.pwn(57) : warning 219: local variable "armour" shadows a variable at a preceding level
C:\Documents and Settings\Matz\Desktop\realhit.pwn(59) : warning 219: local variable "health" shadows a variable at a preceding level
C:\Documents and Settings\Matz\Desktop\realhit.pwn(69) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Matz\Desktop\realhit.pwn(70) : warning 219: local variable "armour" shadows a variable at a preceding level
C:\Documents and Settings\Matz\Desktop\realhit.pwn(72) : warning 219: local variable "health" shadows a variable at a preceding level
C:\Documents and Settings\Matz\Desktop\realhit.pwn(82) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Matz\Desktop\realhit.pwn(83) : warning 219: local variable "armour" shadows a variable at a preceding level
C:\Documents and Settings\Matz\Desktop\realhit.pwn(85) : warning 219: local variable "health" shadows a variable at a preceding level
C:\Documents and Settings\Matz\Desktop\realhit.pwn(95) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Matz\Desktop\realhit.pwn(96) : error 001: expected token: ")", but found "new"
C:\Documents and Settings\Matz\Desktop\realhit.pwn(96) : error 003: declaration of a local variable must appear in a compound block
C:\Documents and Settings\Matz\Desktop\realhit.pwn(96) : warning 221: label name "Float" shadows tag name
C:\Documents and Settings\Matz\Desktop\realhit.pwn(96) : error 017: undefined symbol "armour"
C:\Documents and Settings\Matz\Desktop\realhit.pwn(96) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


8 Errors.
Btw It was 0.3b
Reply
#8

Matz you should really fix shit on your own instead of having people do it for you. That's the easiest shit I've seen to fix.
Reply
#9

Help me:

Код:
error 025: function heading differs from prototype
Код:
public OnPlayerShootPlayer(shooter,target,Float:damage)
Reply
#10

Quote:
Originally Posted by Mauzen
Посмотреть сообщение
The first problem I saw is this:

pawn Код:
if(GetPlayerWeapon(shooter) == 29 || 31 || 30)
You cannot compare it that way, pawn will read it like this:
pawn Код:
if(GetPlayerWeapon(shooter) == 29)
OR
if(31)
OR
if(30)
As 31/30 are not 0, pawn reads them as true, so this line will always be true.
You will have to do it this, change all matching ifs:

pawn Код:
if(GetPlayerWeapon(shooter) == 29 || GetPlayerWeapon(shooter) == 31 || GetPlayerWeapon(shooter) == 30)
Dont know if there are other mistakes, but this is the most fatal one, as the used weapon is not detected correctly.

But however, nice work. Tons of "pro scripters" dont manage it to create something like this, and whine in the request thread, but you as a beginner just made it on your own. Keep it up!
[/quote]The first problem I saw is this:

pawn Cуdigo:

if(GetPlayerWeapon(shooter) == 29 || 31 || 30)


You cannot compare it that way, pawn will read it like this:
pawn Cуdigo:

if(GetPlayerWeapon(shooter) == 29)
OR
if(31)
OR
if(30)[/quote]

that is C# code, || => that is the "or" operator, i think thats fine...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)