expected token "," but found ";" :|
#1

hi there. i have a problem that is no making sense.
C:\Users\Cristi\Desktop\server\gamemodes\WAR.pwn(7 85) : error 001: expected token: ",", but found ";"
C:\Users\Cristi\Desktop\server\gamemodes\WAR.pwn(7 87) : error 001: expected token: ",", but found ";"
C:\Users\Cristi\Desktop\server\gamemodes\WAR.pwn(7 91) : error 001: expected token: ",", but found ";"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


3 Errors.
pawn Код:
Line 785: format(string, sizeof(string), "Health: %i.",GetPlayerHealth(playerid, health);
Line 787: format(string, sizeof(string), "Weapons: %i.",GetPlayerWeapon(playerid);
Line 791: format(string, sizeof(string),"Armour: %i.",GetPlayerArmour(playerid, armour);
where is the problem??
Reply
#2

You're missing a ) at the end of each line.
Reply
#3

hey Holy Shit what are you doing man?
see at the end of you codes
and these are floats you can not use it at this way

PHP код:

new Float:health;
new 
Float:armour;
GetPlayerHealth(playerid health);
GetPlayerArmour(playerid armour);
format(stringsizeof(string), "Health: %f.",health);
format(stringsizeof(string), "Weapons: %d.",GetPlayerWeapon(playerid));
format(stringsizeof(string),"Armour: %f.",armour); 
Maybe +REP
Reply
#4

pawn Код:
//To fix line 785: (Usage of 'GetPlayerHealth' was incorrect)
new Float:health;
GetPlayerHealth(playerid, health);
format(string, sizeof(string), "Health: %0.2f.", health);

//To fix line 787: (Did not close the brackets properly)
format(string, sizeof(string), "Weapons: %i.", GetPlayerWeapon(playerid));

//To fix line 791: (Usage of 'GetPlayerArmour' was incorrect)
new Float:armour;
GetPlayerArmour(playerid, armour);
format(string, sizeof(string), "Armour: %0.2f.", armour);
Sources:
https://sampwiki.blast.hk/wiki/GetPlayerHealth
https://sampwiki.blast.hk/wiki/GetPlayerArmour
Reply
#5

holy shit i didn't see that comming. it was missing two ) ) =))
thx a lot guys
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)