19.01.2011, 23:00
hello
I was putting 2 new codes in my script (!score and !fakemsg)
Both give same bug: It says invalid ID while the player with that ID is connected
Here are the command codes:
Some1 can help meh?
I was putting 2 new codes in my script (!score and !fakemsg)
Both give same bug: It says invalid ID while the player with that ID is connected
Код:
[Ask]Sk8er> !ping 1 <Shizzle> [Ask]Sk8er's ping is 42 <[Ask]Sk8er> !fakemsg 1 fu <Shizzle> Error: Invalid player ID.
Код:
irccmd_score(conn, channel[], user[], params[]) { if(!ircIsVop(conn,channel,user)) return AccessDenied(user); new ID = strval(params), PlayerName[24], tString[256], PlayerScore[24]; if(sscanf(params,"s",ID))return ircSay(conn,channel,"3Usage:1 !score <PartOfName/PlayerID>"); if(!IsPlayerConnected(ID))return ircSay(conn,channel,"4*** Error: Invalid player ID."); format(tString,sizeof(tString),"3* Score from %s: %d",PlayerName,ID,PlayerScore); GetPlayerScore(ID); ircSay(BotSwitcher(),channel,tString); #pragma unused conn, user return true; } irccmd_fakemsg(conn, channel[], user[], params[]) { if(!ircIsOp(conn,channel,user)) return AccessDenied(user); new ID = strval(params),tString[128], PlayerName[24], msg[100]; GetPlayerName(ID, PlayerName, sizeof(PlayerName)); if(sscanf(params,"ss",ID,msg)) return ircSay(conn,channel,"3Usage:1 !fakemsg <PartOfName/PlayerID> <Message>"); if(!IsPlayerConnected(ID))return ircSay(conn,channel,"5Error: Invalid player ID."); SendPlayerMessageToAll(ID,msg); format(tString,sizeof(tString),"[%d] 07%s: %s",ID,PlayerName,msg); ircSay(BotSwitcher(),channel,tString); #pragma unused user,conn return true; }