it won't get fixed! help
#1

A simple /stats command i don't know what the fuck has just happened while compiling....

Code:

PHP код:
CMD:stats(playeridparams[])
{
    new 
string[128];
    
format(stringsizeof(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(playerid5DIALOG_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 075input line too long (after substitutions)
C:\Users\Admin\Desktop\SAMP Releases\[GameMode]World Stunt Freeroam v0.5\gamemodes\WSF.pwn(30859) : error 017undefined symbol "PlayerInf"
C:\Users\Admin\Desktop\SAMP Releases\[GameMode]World Stunt Freeroam v0.5\gamemodes\WSF.pwn(30860) : warning 217loose indentation
C
:\Users\Admin\Desktop\SAMP Releases\[GameMode]World Stunt Freeroam v0.5\gamemodes\WSF.pwn(30860) : error 017undefined symbol "o"
C:\Users\Admin\Desktop\SAMP Releases\[GameMode]World Stunt Freeroam v0.5\gamemodes\WSF.pwn(30860) : warning 215expression has no effect
C
:\Users\Admin\Desktop\SAMP Releases\[GameMode]World Stunt Freeroam v0.5\gamemodes\WSF.pwn(30860) : error 001expected token";"but found "]"
C:\Users\Admin\Desktop\SAMP Releases\[GameMode]World Stunt Freeroam v0.5\gamemodes\WSF.pwn(30860) : error 029invalid expressionassumed zero
C
:\Users\Admin\Desktop\SAMP Releases\[GameMode]World Stunt Freeroam v0.5\gamemodes\WSF.pwn(30860) : fatal error 107too many error messages on one line
Compilation aborted
.Pawn compiler 3.2.3664              Copyright (c1997-2006ITB CompuPhase
6 Errors

Reply
#2

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(stringsizeof(string), stringPlayerInfo[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
Reply
#3

Damn? does strcat work same as fomat(string.........?
Reply
#4

No,https://sampwiki.blast.hk/wiki/Strcat
Reply
#5

Ok thanks
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)