Problem.. Acccesds.
#1

pawn Код:
CMD:marry(playerid,params[])
{
new string[500];
new ID,Nam[MAX_PLAYER_NAME],PName[MAX_PLAYER_NAME];
if(sscanf(params,"i",ID)) return SendClientMessage(playerid,COLOR_GREY, "USAGE: /marry [ID]");
for(new i = 4; i <= MAX_PLAYERS; i++){
if(!IsPlayerConnected(ID))return SendClientMessage(playerid,red,"That user is not connected.");
if(PlayerInfo[playerid][Married] == 1) return SendClientMessage(playerid,COLOR_GREY,"Error: You are already married/or/The person you want to marry is married");
if(PlayerInfo[ID][Married] == 1) return SendClientMessage(playerid,COLOR_GREY,"Error: You are already married/or/The person you want to marry is married");
offer[ID] = 1;
GetPlayerName(playerid,Nam,sizeof(Nam));
GetPlayerName(ID,PName,sizeof(PName)):
format(string,500,"Congratulations! %s has offered you to marry, to accept this marriage type /accept", PName);
SendClientMessage(ID,COLOR_GREY,string);
format(string,500,"Congratulations! You have offered %s to marry, Wait for him to accept the marry.", Nam);
SendClientMessage(playerid,COLOR_GREY,string);
}
return 1;
}
Errors:
error 001: expected token: ";", but found ":"
C:\Documents and Settings\Rehan\My Documents\Downloads\samp03x_svr_R1-2_win32(1)\gamemodes\barron.pwn(6367) : error 029: invalid expression, assumed zero
Reply
#2

annoys me as fuck, fucking my script..
Reply
#3

pawn Код:
CMD:marry(playerid,params[])
{
new string[500];
new ID,Nam[MAX_PLAYER_NAME],PName[MAX_PLAYER_NAME];
if(sscanf(params,"i",ID)) return SendClientMessage(playerid,COLOR_GREY, "USAGE: /marry [ID]");
for(new i = 4; i <= MAX_PLAYERS; i++){
if(!IsPlayerConnected(ID))return SendClientMessage(playerid,red,"That user is not connected.");
if(PlayerInfo[playerid][Married] == 1) return SendClientMessage(playerid,COLOR_GREY,"Error: You are already married/or/The person you want to marry is married");
if(PlayerInfo[ID][Married] == 1) return SendClientMessage(playerid,COLOR_GREY,"Error: You are already married/or/The person you want to marry is married");
offer[ID] = 1;
GetPlayerName(playerid,Nam,sizeof(Nam));
GetPlayerName(ID,PName,sizeof(PName));
format(string,500,"Congratulations! %s has offered you to marry, to accept this marriage type /accept", PName);
SendClientMessage(ID,COLOR_GREY,string);
format(string,500,"Congratulations! You have offered %s to marry, Wait for him to accept the marry.", Nam);
SendClientMessage(playerid,COLOR_GREY,string);
}
return 1;
}
its done
Reply
#4

There is no change in it.
Reply
#5

And same errors in this code same 2 error in accept command, and same 2 error in declinemarriage command
pawn Код:
CMD:accept(playerid,params[])
{
new string[500];
new ID,Nam[MAX_PLAYER_NAME],PName[MAX_PLAYER_NAME];
if(offer[playerid] == 1) {
if(sscanf(params,"i",ID)) return SendClientMessage(playerid,COLOR_GREY, "USAGE: /accept [ID]");
if(PlayerInfo[ID][Married] == 1) return SendClientMessage(playerid,COLOR_GREY,"Error: You are already married/or/The person you want to marry is married");
offer[playerid] = 0;
GetPlayerName(playerid,Nam,sizeof(Nam));
GetPlayerName(ID,PName,sizeof(PName)):
format(string,500,"Congratulations! %s and %s has successfully married!",PName,Nam);
SendClientMessageToAll(COLOR_GREY,string);
}
return 1;
}
CMD:declinemarriage(playerid,params[])
{
new string[500];
new ID,Nam[MAX_PLAYER_NAME],PName[MAX_PLAYER_NAME];
if(offer[playerid] == 1) {
if(sscanf(params,"i",ID)) return SendClientMessage(playerid,COLOR_GREY, "USAGE: /declinemarriage [ID]");
offer[playerid] = 0;
GetPlayerName(playerid,Nam,sizeof(Nam));
GetPlayerName(ID,PName,sizeof(PName)):
format(string,500,"%s has declined to marry with %s.", Nam,PName);
SendClientMessageToAll(COLOR_GREY,string);
}
return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)