Error 025 and Error 029
#1

Hello

I have this script and i am trying to fix it. Here are some errors which i am getting when i try to compile it.

Код:
wcrp\help.pwn(40) : error 029: invalid expression, assumed zero
C:\Users\USER\Documents\Backup\RP\pawno\WCRP.pwn(1148) : error 025: function heading differs from prototype
C:\Users\USER\Documents\Backup\RP\pawno\WCRP.pwn(1152) : error 025: function heading differs from prototype
Lines 1148 - 1155 - (WCRP.pwn)

Код:
public OnPlayerGiveDamage(playerid, damagedid, Float:amount, weaponid, bodypart) {
	factionsOnPlayerGiveDamage(playerid, damagedid, amount, weaponid);
	acOnPlayerGiveDamage(playerid, damagedid, amount, weaponid);
}
public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid, bodypart) {
	boxingOnPlayerTakeDamage(playerid, issuerid, amount, weaponid);
	//damageSystemOnPlayerTakeDamage(playerid, issuerid, amount, weaponid);
}
Lines 31 - 40 - (help.pwn)

Код:
new RandomTips[][ERandomTipInfo] = {
	{"You can use your locker at Unity to store items such as guns, materials, and money"},
	{"You can get your driving license at City Hall"},
	{"If you join a family you can participate in Turf/Point wars and win items!"},
	{"You can buy a lotto ticket at any 24/7"},
	{"You can get a cell phone at any 24/7"},
	{"Do /settings to turn off these hints, and more!"},
	{"Check out our forums and website at: http://www.scrp.byethost31.net"},
	//{"Join us on TeamSpeak: voice.wc-rp.net"}
}
Reply
#2

Fix this first and i will see others :

PHP код:

new RandomTips[][ERandomTipInfo] =
{
    {
"You can use your locker at Unity to store items such as guns, materials, and money"},
    {
"You can get your driving license at City Hall"},
    {
"If you join a family you can participate in Turf/Point wars and win items!"},
    {
"You can buy a lotto ticket at any 24/7"},
    {
"You can get a cell phone at any 24/7"},
    {
"Do /settings to turn off these hints, and more!"},
    {
"Check out our forums and website at: http://www.scrp.byethost31.net"},
}; 
Reply
#3

Just one thing im not sure of it

did you Forwarded , stocks , advariables of ERandomTipInfo nd' RandomTips
Reply
#4

I done that ^^ Now These errors are there:

pawn Код:
C:\Users\USER\Documents\Backup\RP\pawno\WCRP.pwn(1148) : error 025: function heading differs from prototype
C:\Users\USER\Documents\Backup\RP\pawno\WCRP.pwn(1152) : error 025: function heading differs from prototype
wcrp\help.pwn(40) : error 029: invalid expression, assumed zero
wcrp\help.pwn(40) : error 008: must be a constant expression; assumed zero
Reply
#5

pawn Код:
new RandomTips[][ERandomTipInfo] = {
    {"You can use your locker at Unity to store items such as guns, materials, and money"},
    {"You can get your driving license at City Hall"},
    {"If you join a family you can participate in Turf/Point wars and win items!"},
    {"You can buy a lotto ticket at any 24/7"},
    {"You can get a cell phone at any 24/7"},
    {"Do /settings to turn off these hints, and more!"},
    {"Check out our forums and website at: http://www.scrp.byethost31.net"} //There shouldn't be any comma(",") here.
    /*{"Join us on TeamSpeak: voice.wc-rp.net"}*/
}
Reply
#6

okey , first problem solved ,

second one now :


PHP код:
public OnPlayerGiveDamage(playeriddamagedidFloat:amountweaponidbodypart) {
    
factionsOnPlayerGiveDamage(playeriddamagedidamountweaponid);
    
acOnPlayerGiveDamage(playeriddamagedidamountweaponid);
        return 
1;
}
public 
OnPlayerTakeDamage(playeridissueridFloatamountweaponidbodypart) {
    
boxingOnPlayerTakeDamage(playeridissueridamountweaponid);
    
//damageSystemOnPlayerTakeDamage(playerid, issuerid, amount, weaponid);
        
return 1;

tell me if there is more problems ..
Reply
#7

Still got these errors:

PHP код:
C:\Users\USER\Documents\Backup\RP\pawno\WCRP.pwn(1148) : error 025: function heading differs from prototype
C
:\Users\USER\Documents\Backup\RP\pawno\WCRP.pwn(1153) : error 025: function heading differs from prototype 
Reply
#8

Can you show the lines where you define
pawn Код:
factionsOnPlayerGiveDamage
    acOnPlayerGiveDamage(playerid, damagedid, amount, weaponid);
    boxingOnPlayerTakeDamage(playerid, issuerid, amount, weaponid);
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)