Increasing weapon damage problem.
#1

I've increased weapon damge...sort of.
and got :
Quote:

D:\SAMP Server\gamemodes\script.pwn(440) : error 017: undefined symbol "shooter"
D:\SAMP Server\gamemodes\script.pwn(443) : error 017: undefined symbol "target"
D:\SAMP Server\gamemodes\script.pwn(444) : error 017: undefined symbol "target"
D:\SAMP Server\gamemodes\script.pwn(445) : error 017: undefined symbol "phealth"
D:\SAMP Server\gamemodes\script.pwn(445) : error 017: undefined symbol "target"
D:\SAMP Server\gamemodes\script.pwn(445) : error 029: invalid expression, assumed zero

Lines:
Line 440 :
pawn Код:
if(GetPlayerWeapon(shooter)== 22)
Line 443 :
pawn Код:
GetPlayerHealth(target,health);
Line 444:
pawn Код:
SetPlayerHealth(target,health-20);
Line 445:
pawn Код:
phealth[target]=floatround(health+armour-20);
Reply
#2

n00b Scripter....
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
you need to define your Errors With "new" you know...?
Reply
#3

I'm new, chill, and mind telling what to add after the ' new '.
I just started today, anyone mind helping me ?
Reply
#4

Leave the guy alone , he IS learning and your not helping.
You need to define your variables like this.

pawn Код:
new shooter;
new target;
new Float:pHealth;
Get it ?
Put them under your command or
whatever callback.
Reply
#5

Thanks, what command ?
Reply
#6

Quote:
Originally Posted by Darnell
Посмотреть сообщение
Thanks, what command ?
Above where you have all your

OnPlayerShootPlayer and whatever..
Reply
#7

pawn Код:
new Float:health,Float:armour;
for the "Target" and the "Shooter" i need your script.


if(GetPlayerWeapon(shooter)== 22

GetPlayerHealth(target,health);

SetPlayerHealth(target,health-20);

pawn Код:
new phealth[target]=floatround(health+armour-20);
Reply
#8

Quote:
Originally Posted by Darnell
Посмотреть сообщение
Thanks, what command ?
Oh, God....
Reply
#9

Quote:

D:\SAMP Server\gamemodes\script.pwn(446) : error 017: undefined symbol "phealth"
D:\SAMP Server\gamemodes\script.pwn(446) : warning 215: expression has no effect
D:\SAMP Server\gamemodes\script.pwn(446) : error 001: expected token: ";", but found "]"
D:\SAMP Server\gamemodes\script.pwn(446) : error 029: invalid expression, assumed zero

:\...
Line 446:
pawn Код:
phealth[target]=floatround(health+armour-20);
Reply
#10

:\...
Line 446:
pawn Код:
/* >>>*/ new /* <<<*/phealth[target]=floatround(health+armour-20);
Reply
#11

Quote:

:\SAMP Server\gamemodes\script.pwn(446) : error 017: undefined symbol "phealth"
D:\SAMP Server\gamemodes\script.pwn(446) : warning 215: expression has no effect
D:\SAMP Server\gamemodes\script.pwn(446) : error 001: expected token: ";", but found "]"
D:\SAMP Server\gamemodes\script.pwn(446) : error 029: invalid expression, assumed zero

Same line, did what you told me.
Reply
#12

You know.. You DON'T need to do:
pawn Код:
/* >>>*/ new /* <<<*/phealth[target]=floatround(health+armour-20);
You need to do
pawn Код:
new phealth[MAX_PLAYERS] = floatround(health+armour-20);
Reply
#13

Anyone can give me a new code that makes that deagle will deal 55 health points ?
And a code that tells you how much health you lost upon being hit / shot.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)