it won't get fixed! help - 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)
+--- Thread: it won't get fixed! help (
/showthread.php?tid=627591)
it won't get fixed! help -
RyderX - 29.01.2017
A simple /stats command i don't know what the fuck has just happened while compiling....
Code:
PHP код:
CMD:stats(playerid, params[])
{
new string[128];
format(string, sizeof(string), "{FFFFFF}Your Freeroam Stats:\n\n{FF0000}Kills: {00ffec}%d\n{FF0000}Deaths: {00ffec}%d\n{FF0000}Score: {00ffec}%d\n{FF0000}Money: {00ffec}%d\n{FF0000}Admin Level: {00ffec}%d\n{FF0000}Premium Level: {00ffec}%d\n {ff0000}Cookies: {00ffec}%d\n{ff0000}Cakes: {00ffec}%d\n", PlayerInfo[playerid][pKills], PlayerInfo[playerid][pDeaths], GetPlayerScore(playerid), GetPlayerMoney(playerid), PlayerInfo[playerid][pAdmin], PlayerInfo[playerid][pTP],PlayerInfo[playerid][pCookie],PlayerInfo[playerid][pCake]);
ShowPlayerDialog(playerid, 5, DIALOG_STYLE_MSGBOX, "{FF8000}Your WSF Stats:", string, "Ok", "");
return 1;
}
PHP код:
C:\Users\Admin\Desktop\SAMP - Releases\[GameMode]World Stunt Freeroam v0.5\gamemodes\WSF.pwn(30858) : error 075: input line too long (after substitutions)
C:\Users\Admin\Desktop\SAMP - Releases\[GameMode]World Stunt Freeroam v0.5\gamemodes\WSF.pwn(30859) : error 017: undefined symbol "PlayerInf"
C:\Users\Admin\Desktop\SAMP - Releases\[GameMode]World Stunt Freeroam v0.5\gamemodes\WSF.pwn(30860) : warning 217: loose indentation
C:\Users\Admin\Desktop\SAMP - Releases\[GameMode]World Stunt Freeroam v0.5\gamemodes\WSF.pwn(30860) : error 017: undefined symbol "o"
C:\Users\Admin\Desktop\SAMP - Releases\[GameMode]World Stunt Freeroam v0.5\gamemodes\WSF.pwn(30860) : warning 215: expression has no effect
C:\Users\Admin\Desktop\SAMP - Releases\[GameMode]World Stunt Freeroam v0.5\gamemodes\WSF.pwn(30860) : error 001: expected token: ";", but found "]"
C:\Users\Admin\Desktop\SAMP - Releases\[GameMode]World Stunt Freeroam v0.5\gamemodes\WSF.pwn(30860) : error 029: invalid expression, assumed zero
C:\Users\Admin\Desktop\SAMP - Releases\[GameMode]World Stunt Freeroam v0.5\gamemodes\WSF.pwn(30860) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
6 Errors.
Re: it won't get fixed! help - iLearner - 29.01.2017
PHP код:
strcat(string, "{FFFFFF}Your Freeroam Stats:\n\n{FF0000}Kills: {00ffec}%d\n{FF0000}Deaths: {00ffec}%d\n{FF0000}Score: {00ffec}%d\n");
strcat(string, "{FF0000}Money: {00ffec}%d\n{FF0000}Admin Level: {00ffec}%d\n{FF0000}Premium Level: {00ffec}%d\n {ff0000}Cookies: {00ffec}%d\n{ff0000}Cakes: {00ffec}%d\n");
format(string, sizeof(string), string, PlayerInfo[playerid][pKills], PlayerInfo[playerid][pDeaths], GetPlayerScore(playerid), GetPlayerMoney(playerid), PlayerInfo[playerid][pAdmin], PlayerInfo[playerid][pTP],PlayerInfo[playerid][pCookie],PlayerInfo[playerid][pCake]);
Also, you should your string len a bit
Re: it won't get fixed! help -
RyderX - 29.01.2017
Damn? does strcat work same as fomat(string.........?
Re: it won't get fixed! help -
ISmokezU - 29.01.2017
No,
https://sampwiki.blast.hk/wiki/Strcat
Re: it won't get fixed! help -
RyderX - 29.01.2017
Ok thanks