CMD:test(playerid, params[])
{
new exp = GetPlayerScore(playerid);
SetPlayerScore(Playerid,exp+1);
format(exp,sizeof(exp),"Exp:%i/%i",GetPlayerScore(playerid),JumlahExp[playerid]);
SendClientMessage(playerid,warna_biru,exp);
return 1;
}
D:\data aji\Samp server\gamemodes\fr1.pwn(1609) : error 017: undefined symbol "Playerid"
D:\data aji\Samp server\gamemodes\fr1.pwn(1610) : error 035: argument type mismatch (argument 1)
D:\data aji\Samp server\gamemodes\fr1.pwn(1610) : error 035: argument type mismatch (argument 1)
D:\data aji\Samp server\gamemodes\fr1.pwn(1611) : error 035: argument type mismatch (argument 3)
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
4 Errors.
new exp = GetPlayerScore(playerid); format(exp,sizeof(exp),"Exp:%i/%i",GetPlayerScore(playerid),JumlahExp[playerid]);
https://sampwiki.blast.hk/wiki/Format
The output of a format always has to be a string value, however you're trying to fit it into an integer Код:
new exp = GetPlayerScore(playerid); format(exp,sizeof(exp),"Exp:%i/%i",GetPlayerScore(playerid),JumlahExp[playerid]); Try it and come back if you need more help. |
Depends on your script, as I can see JumlahExp[MAX_PLAYERS] is your exp variable, the default player score is your score variable, you can change or modify them as you like. As an example, by killing someone you could add +=2 to the exp value and +1 to the player score value.
|
new JumlahExp[MAX_PLAYERS] = 10;
enum pInfo{
Exp,
}
PlayerInfo[MAX_PLAYERS][pInfo];
PlayerInfo[playerid][Exp]
CMD:test(playerid, params[]){
new exp;
format(exp,sizeof(exp),"Exp:%i/%i",PlayerInfo[playerid][Exp],JumlahExp[playerid]);
SendClientMessage(playerid,col_green,exp);
}
Depends on your script, as I can see JumlahExp[MAX_PLAYERS] is your exp variable, the default player score is your score variable, you can change or modify them as you like. As an example, by killing someone you could add +=2 to the exp value and +1 to the player score value.
|