server error
#1

Quote:

C:\Users\hp\Desktop\Server12\gamemodes\ak.pwn(2228 ) : error 001: expected token: ";", but found "-identifier-"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


1 Error.

from:
PHP код:
COMMAND:setscore(playerid,params[])
{
    if(
PlayerInfo[playerid][Level] < 2) return SendClientMessage(playerid,color_red,"You don't have the permission to use this command!");
    new 
id,value;
    if(
sscanf(params,"ii",id,value)) return SendClientMessage(playerid,color_red,"USAGE: /setscore [playerID] [value]")
    
SetPlayerScore(id,value);
    
SendClientMessageEx(id,color_green,"sssis","Administrator ",PlayerInfo[playerid][Username]," has set your score to ",value," !");
    
SendClientMessageEx(playerid,color_green,"sssis","You have set ",PlayerInfo[id][Username],"'s score to ",value," .");
    return 
1;

any 1 knows how to fix it ?ty


another thing;

PHP код:
COMMAND:stats(playerid,params[])
{
    
SendClientMessage(playerid,color_green,"Your current stats:");
    
SendClientMessageEx(playerid,color_yellow,"sis","Score: ",GetPlayerScore(playerid),".");
    
SendClientMessageEx(playerid,color_yellow,"sis","Money: ",GetPlayerMoney(playerid),".");
    return 
1;

can u tell me the code for kills deaths kill ratio , hrs mins etc.
Reply
#2

pawn Код:
COMMAND:setscore(playerid,params[])
{
    if(PlayerInfo[playerid][Level] < 2) return SendClientMessage(playerid,color_red,"You don't have the permission to use this command!");
    new id,value;
    if(sscanf(params,"ii",id,value)) return SendClientMessage(playerid,color_red,"USAGE: /setscore [playerID] [value]"); // put the ";" here..
    SetPlayerScore(id,value);
    SendClientMessageEx(id,color_green,"sssis","Administrator ",PlayerInfo[playerid][Username]," has set your score to ",value," !");
    SendClientMessageEx(playerid,color_green,"sssis","You have set ",PlayerInfo[id][Username],"'s score to ",value," .");
    return 1;
}
You forgot to add ";" in the end of 3 line. Just replace it with my command and it should work well..

-FalconX
Reply
#3

hey when i changed it all cmds/admin cmds bugged
eg. "/ban 0 hack" tells me USAGE: /ban [ID] [REASON]
someon help pls
says: sscanf error: system not initialised
Reply
#4

Quote:
Originally Posted by AhmadKing
Посмотреть сообщение
hey when i changed it all cmds/admin cmds bugged
eg. "/ban 0 hack" tells me USAGE: /ban [ID] [REASON]
someon help pls
says: sscanf error: system not initialised
There are plenty of posts about this problem. Use search.
Reply
#5

pawn Код:
COMMAND:setscore(playerid,params[])
{
    if(PlayerInfo[playerid][Level]  >= 2) return SendClientMessage(playerid,color_red,"You don't have the permission to use this command!");
    new id,value;
    if(sscanf(params,"ii",id,value)) return SendClientMessage(playerid,color_red,"USAGE: /setscore [playerID] [value]"); // put the ";" here..
    SetPlayerScore(id,value);
    SendClientMessageEx(id,color_green,"sssis","Administrator ",PlayerInfo[playerid][Username]," has set your score to ",value," !");
    SendClientMessageEx(playerid,color_green,"sssis","You have set ",PlayerInfo[id][Username],"'s score to ",value," .");
    return 1;
}
Changed the < 2) to >=2) and it should work.

Also about the sscanf problem, try and update your plugins.
Reply
#6

Quote:
Originally Posted by Shetch
Посмотреть сообщение
There are plenty of posts about this problem. Use search.
if you dont wanna help then dont open my topic.
thx
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)