SA-MP Forums Archive
i messed up?! - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: i messed up?! (/showthread.php?tid=204707)



i messed up?! - Fool - 30.12.2010

this is my rules command, i send it to the irc, so i know if someone use it. it would be soo great if i got it fixed.

Warnings:
Код:
C:\Users\me\Desktop\Script\gamemodes\CR.pwn(10403) : warning 219: local variable "PlayerName" shadows a variable at a preceding level
C:\Users\me\Desktop\Script\gamemodes\CR.pwn(10404) : error 012: invalid function call, not a valid address
C:\Users\me\Desktop\Script\gamemodes\CR.pwn(10404) : warning 215: expression has no effect
C:\Users\me\Desktop\Script\gamemodes\CR.pwn(10404) : error 001: expected token: ";", but found ")"
C:\Users\me\Desktop\Script\gamemodes\CR.pwn(10404) : error 029: invalid expression, assumed zero
C:\Users\me\Desktop\Script\gamemodes\CR.pwn(10404) : fatal error 107: too many error messages on one line
^ Warnings.


Now The Code.
Код:
dcmd_rules(playerid,params[])
{
new str[100];
new PlayerName[MAX_PLAYER_NAME];
format(str,sizeof str,"0,5%s Is Reading the server rules!",PlayerName(playerid));
IRC_GroupSay(gGroupID, channel, str);

    SendClientMessage(playerid,blue,"1 - Dont Deathmatch.");
    SendClientMessage(playerid,blue,"2 - Dont Revenge Kill");
    SendClientMessage(playerid,blue,"3 - Dont Hack/Cheat");
    SendClientMessage(playerid,blue,"4 - Dont Abuse Bugs");
    SendClientMessage(playerid,blue,"5 - Dont Insult/Flame");
  
    return true;
}
and it goes up to 20 rules, so please help me.


Re: i messed up?! - MadeMan - 30.12.2010

Remove this line.

pawn Код:
new PlayerName[MAX_PLAYER_NAME];



Re: i messed up?! - <Weponz> - 30.12.2010

change 10403 and 10404 to
pawn Код:
new pName[MAX_PLAYER_NAME];
format(str,sizeof str,"0,5%s Is Reading the server rules!",pName);
SendClientMessageToAll(0x0,str);
the compile..if u get more post them ill help
//0x0 is black color define

EDITED again xD compile now


Re: i messed up?! - Fool - 30.12.2010

Quote:
Originally Posted by MadeMan
Посмотреть сообщение
Remove this line.

pawn Код:
new PlayerName[MAX_PLAYER_NAME];
Worked.

No need Weaponz, i fixed it, but thanks for you help


Re: i messed up?! - <Weponz> - 30.12.2010

oh now i see that irc thing xD


Re: i messed up?! - LegendNissanGTR - 30.12.2010

Lol xD