SA-MP Forums Archive
help tag mistach and - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: help tag mistach and (/showthread.php?tid=166932)



help tag mistach and - Jamal' - 10.08.2010

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 =|


Re: help tag mistach and - Hiddos - 10.08.2010

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


Re: help tag mistach and - Jamal' - 10.08.2010

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


Re: help tag mistach and - Hiddos - 10.08.2010

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

Try changing it to level[targetid]


Re: help tag mistach and - Jamal' - 10.08.2010

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 -.-'


Re: help tag mistach and - Kar - 10.08.2010

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);
}



Re: help tag mistach and - Jamal' - 10.08.2010

why i need use a stock it i got a public function?


Re: help tag mistach and - Kar - 10.08.2010

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


Re: help tag mistach and - Jamal' - 10.08.2010

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?


Re: help tag mistach and - Jamal' - 10.08.2010

its the
Quote:

stock ShowStats(targetid)

line