help tag mistach and
#1

can someone help me with it?

im geting this warnings
PHP код:
C:\Users\hpi\Desktop\SCRIPTING\Life Role Play\gamemodes\l-rp-v1.pwn(87) : warning 217loose indentation
C
:\Users\hpi\Desktop\SCRIPTING\Life Role Play\gamemodes\l-rp-v1.pwn(89) : warning 213tag mismatch 
PHP код:
public ShowStats(playerid,targetid)
{
    new 
name[MAX_PLAYER_NAME];
    new 
cash =  GetPlayerMoney(targetid);
    new 
coordsstring[128];
        
format(coordsstringsizeof(coordsstring),"|_________________________________________________| %s (%d) |_________________________________________________|",nametargetid);
        
SendClientMessage(playeridCOLOR_GREEN,coordsstring);
        
format(coordsstringsizeof(coordsstring), "|Level: %d | Cash: $%d"level,cash);

i foward the public ShowStats fuction and initialize the variables but im geting this warnings i dont know why it happens =|
Reply
#2

What type of variable is 'level'?

Edit: Ah well, that didn't made any sense.

For the loose indents, remove the tabs till all code is on the same line.

Also, I'm gonna kill whoever says '#pragma tabsize 0' :P
Reply
#3

ahah tabsize helped me Ty but i keep the tag mistach i will give a look to find what is wrong
Reply
#4

Is level a multivar (Or what I call it), like level[MAX_PLAYERS] and level[playerid]?

Try changing it to level[targetid]
Reply
#5

omg i didnt initialize the level variable lol i tryed to put it now with
Quote:

new level = GetPlayerScore[targetid);

but it get more errors -.-'
Reply
#6

wow..

/facepalm

pawn Код:
stock ShowStats(targetid)
{
    new name[MAX_PLAYER_NAME];
    new cash =  GetPlayerMoney(targetid);
    new level = GetPlayerScore(targetid);
    new coordsstring[128],coordsstring2[128];
    format(coordsstring, sizeof(coordsstring),"|_________________________________________________| %s (%d) |_________________________________________________|",name, targetid);
    SendClientMessage(targetid, COLOR_GREEN,coordsstring);
    format(coordsstring2, sizeof(coordsstring2), "|Level: %d | Cash: $%d", level,cash);
    SendClientMessage(targetid, COLOR_GREEN,coordsstring2);
}
Reply
#7

why i need use a stock it i got a public function?
Reply
#8

Quote:
Originally Posted by Jamal'
Посмотреть сообщение
why i need use a stock it i got a public function?
just use that
Reply
#9

ok i put it and delete the public but now i get one error
Quote:

C:\Users\hpi\Desktop\SCRIPTING\Life Role Play\gamemodes\l-rp-v1.pwn(83) : error 025: function heading differs from prototype

Kar you know what is wrong?
Reply
#10

its the
Quote:

stock ShowStats(targetid)

line
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)