Errors
#1

Код:
C:\Users\user\Desktop\roleplay\backup gamemode\roleplay.pwn(3042) : error 017: undefined symbol "GivePlayerCash"
C:\Users\user\Desktop\roleplay\backup gamemode\roleplay.pwn(3060) : error 017: undefined symbol "GivePlayerCash"
C:\Users\user\Desktop\roleplay\backup gamemode\roleplay.pwn(3167) : error 017: undefined symbol "GivePlayerCash"
C:\Users\user\Desktop\roleplay\backup gamemode\roleplay.pwn(3386) : error 017: undefined symbol "GivePlayerCash"
C:\Users\user\Desktop\roleplay\backup gamemode\roleplay.pwn(3644) : error 017: undefined symbol "GivePlayerCash"
C:\Users\user\Desktop\roleplay\backup gamemode\roleplay.pwn(3645) : error 017: undefined symbol "GivePlayerCash"
C:\Users\user\Desktop\roleplay\backup gamemode\roleplay.pwn(5943) : error 017: undefined symbol "NOPCheck"
C:\Users\user\Desktop\roleplay\backup gamemode\roleplay.pwn(5967) : error 017: undefined symbol "IsPlayerInRangeOfVehicle"
C:\Users\user\Desktop\roleplay\backup gamemode\roleplay.pwn(8308) : error 017: undefined symbol "IsNumeric"
C:\Users\user\Desktop\roleplay\backup gamemode\roleplay.pwn(8352) : error 017: undefined symbol "GivePlayerCash"
C:\Users\user\Desktop\roleplay\backup gamemode\roleplay.pwn(8426) : error 017: undefined symbol "RemovePlayerWeapon"
C:\Users\user\Desktop\roleplay\backup gamemode\roleplay.pwn(8458) : error 017: undefined symbol "SaveAccountsUpdate"
C:\Users\user\Desktop\roleplay\backup gamemode\roleplay.pwn(8909) : error 017: undefined symbol "MainMenuUpdateForPlayer"
C:\Users\user\Desktop\roleplay\backup gamemode\roleplay.pwn(9467) : error 017: undefined symbol "GivePlayerCash"
C:\Users\user\Desktop\roleplay\backup gamemode\roleplay.pwn(9531) : error 017: undefined symbol "RemovePlayerWeapon"
C:\Users\user\Desktop\roleplay\backup gamemode\roleplay.pwn(9750) : error 017: undefined symbol "UnloadPlayerVehicles"
C:\Users\user\Desktop\roleplay\backup gamemode\roleplay.pwn(9932) : error 017: undefined symbol "GivePlayerCash"
C:\Users\user\Desktop\roleplay\backup gamemode\roleplay.pwn(9945) : error 017: undefined symbol "GivePlayerCash"
C:\Users\user\Desktop\roleplay\backup gamemode\roleplay.pwn(9958) : error 017: undefined symbol "GivePlayerCash"
C:\Users\user\Desktop\roleplay\backup gamemode\roleplay.pwn(9971) : error 017: undefined symbol "GivePlayerCash"
C:\Users\user\Desktop\roleplay\backup gamemode\roleplay.pwn(9984) : error 017: undefined symbol "GivePlayerCash"
C:\Users\user\Desktop\roleplay\backup gamemode\roleplay.pwn(9997) : error 017: undefined symbol "GivePlayerCash"
C:\Users\user\Desktop\roleplay\backup gamemode\roleplay.pwn(10013) : error 017: undefined symbol "GivePlayerCash"
C:\Users\user\Desktop\roleplay\backup gamemode\roleplay.pwn(10029) : error 017: undefined symbol "GivePlayerCash"
C:\Users\user\Desktop\roleplay\backup gamemode\roleplay.pwn(10043) : error 017: undefined symbol "GivePlayerCash"
C:\Users\user\Desktop\roleplay\backup gamemode\roleplay.pwn(10097) : error 017: undefined symbol "GivePlayerCash"

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


26 Errors.
its general errors so i mustn't give the script, help please
Reply
#2

You are having trouble with the keys, review your last mechida the gm where you changed something, and fix the {
Reply
#3

Probably forgot to close something or missing includes.
Reply
#4

I've added this:

Код:
CMD:sms(playerid, params[])
{
	if(gPlayerLogged{playerid} == 0)
	{
		SendClientMessageEx(playerid, COLOR_GREY, "   You haven't logged in yet!");
		return 1;
	}
	if(GetPVarInt(playerid, "Injured") != 0||GetPVarInt(playerid, "Hospital")!=0)
	{
		SendClientMessageEx (playerid, COLOR_GRAD2, "You cannot do this at this time.");
		return 1;
	}
	if(PlayerTied[playerid] != 0 || PlayerCuffed[playerid] != 0)
	{
		SendClientMessageEx(playerid,COLOR_GREY,"You can't use your phone whilist restrained.");
		return 1;
	}

	new string[128], phonenumb, text[100];
	if(sscanf(params, "ds[100]", phonenumb, text)) return SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: (/t)ext [phonenumber] [text chat]");

	if(PlayerInfo[playerid][pPnumber] == 0)
	{
		SendClientMessageEx(playerid, COLOR_GRAD2, "  You don't have a cell phone...");
		return 1;
	}
	if (PlayerInfo[playerid][pJailTime] > 0)
	{
		SendClientMessageEx(playerid,COLOR_GREY,"   You can not use your phone while in jail or prison!");
		return 1;
	}
	if(PhoneOnline[playerid] > 0)
	{
		format(string, sizeof(string), "* %s has turned off his cellphone.", GetPlayerNameEx(playerid));
		SendClientMessageEx(playerid, COLOR_GREY, "Your phone is off.");
		return 1;
	}

	if(Spectating[playerid]==0)
	{
		format(string, sizeof(string), "* %s takes out a cellphone.", GetPlayerNameEx(playerid));
		ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
	}

	if(phonenumb == 555)
	{
		if ((strcmp("yes", text, true, strlen(text)) == 0) && (strlen(text) == strlen("yes")))
		{
			SendClientMessageEx(playerid, COLOR_WHITE, "Text message delivered.");
			if (gTeam[playerid] == 2 || gTeam[playerid] == 1)
			{
				SendClientMessageEx(playerid, COLOR_YELLOW, "SMS: DONT SMS ME BITCH!, Sender: MOLE (555)");
				RingTone[playerid] = 20;
				return 1;
			}
			return 1;
		}
		else
		{
			SendClientMessageEx(playerid, COLOR_YELLOW, "SMS: DONT SMS ME BITCH!, Sender: MOLE (555)");
			RingTone[playerid] = 20;
			return 1;
		}
			if(phonenumb == 556)
	{
		if ((strcmp("yes", text, true, strlen(text)) == 0) && (strlen(text) == strlen("yes")))
		{
			SendClientMessageEx(playerid, COLOR_WHITE, "Text message delivered.");
			if (gTeam[playerid] == 2 || gTeam[playerid] == 1)
			{
				SendClientMessageEx(playerid, COLOR_YELLOW, "SMS: DONT SMS ME BITCH!, Sender: Devil (556)");
				RingTone[playerid] = 20;
				return 1;
			}
			return 1;
		}
		else
		{
			SendClientMessageEx(playerid, COLOR_YELLOW, "SMS: DONT SMS ME BITCH!, Sender: Devil (556)");
			RingTone[playerid] = 20;
			return 1;
		}
			if(phonenumb == 557)
	{
		if ((strcmp("yes", text, true, strlen(text)) == 0) && (strlen(text) == strlen("yes")))
		{
			SendClientMessageEx(playerid, COLOR_WHITE, "Text message delivered.");
			if (gTeam[playerid] == 2 || gTeam[playerid] == 1)
			{
				SendClientMessageEx(playerid, COLOR_YELLOW, "SMS: DONT SMS ME BITCH!, Sender: Angel (557)");
				RingTone[playerid] = 20;
				return 1;
			}
			return 1;
		}
		else
		{
			SendClientMessageEx(playerid, COLOR_YELLOW, "SMS: DONT SMS ME BITCH!, Sender: Angel (557)");
			RingTone[playerid] = 20;
			return 1;
		}
	}
	foreach(Player, i)
	{
		if(PlayerInfo[i][pPnumber] == phonenumb && phonenumb != 0)
		{
			new giveplayerid = i;
			if(Mobile[giveplayerid] != INVALID_PLAYER_ID)
			{
				SendClientMessageEx(playerid, COLOR_GREY, "That player's phone is busy (on a call).");
				return 1;
			}
			Mobile[playerid] = giveplayerid; //caller connecting
			if(IsPlayerConnected(giveplayerid))
			{
				if(giveplayerid != INVALID_PLAYER_ID)
				{

					if(PhoneOnline[giveplayerid] > 0)
					{
						SendClientMessageEx(playerid, COLOR_GREY, "That player's phone is switched off.");
						return 1;
					}
					if(PlayerInfo[playerid][pPhonePrivacy] == 1)
					{
						format(string, sizeof(string), "SMS: %s, Sender: Unknown.", text,GetPlayerNameEx(playerid),PlayerInfo[playerid][pPnumber]);
					}
					else
					{
						format(string, sizeof(string), "SMS: %s, Sender: %s (%d)", text,GetPlayerNameEx(playerid),PlayerInfo[playerid][pPnumber]);
					}

					if(i != playerid)
					{
						if(PlayerInfo[i][pSmslog] > 0)
						{
							//Shuffle the last received messages...
							format(PlayerInfo[i][pSmslog9], 132, "%s", PlayerInfo[i][pSmslog8]);
							format(PlayerInfo[i][pSmslog8], 132, "%s", PlayerInfo[i][pSmslog7]);
							format(PlayerInfo[i][pSmslog7], 132, "%s", PlayerInfo[i][pSmslog6]);
							format(PlayerInfo[i][pSmslog6], 132, "%s", PlayerInfo[i][pSmslog5]);
							format(PlayerInfo[i][pSmslog5], 132, "%s", PlayerInfo[i][pSmslog4]);
							format(PlayerInfo[i][pSmslog4], 132, "%s", PlayerInfo[i][pSmslog3]);
							format(PlayerInfo[i][pSmslog3], 132, "%s", PlayerInfo[i][pSmslog2]);
							format(PlayerInfo[i][pSmslog2], 132, "%s", PlayerInfo[i][pSmslog1]);
							format(PlayerInfo[i][pSmslog1], 132, "%s", PlayerInfo[i][pSmslog0]);
							format(PlayerInfo[i][pSmslog0], 132, "%s", string);
						}
					}

					//format(string, sizeof(string), "* %s's phone beeps.", sendername);
					RingTone[giveplayerid] =20;
					SendClientMessageEx(giveplayerid, COLOR_YELLOW, string);
					SendClientMessageEx(playerid, COLOR_YELLOW, string);
					SendClientMessageEx(playerid, COLOR_WHITE, "Text Message Delivered");
					format(string, sizeof(string), "~r~$-%d", txtcost);
					GameTextForPlayer(playerid, string, 5000, 1);
					GivePlayerCash(playerid,-txtcost);
					PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
					Mobile[playerid] = INVALID_PLAYER_ID;

					if(strcmp(PlayerInfo[giveplayerid][pAutoTextReply], "Nothing", true) != 0)
					{
						format(string, sizeof(string), "SMS: %s, Sender: %s [automated response] (%d)", PlayerInfo[giveplayerid][pAutoTextReply], GetPlayerNameEx(giveplayerid), PlayerInfo[giveplayerid][pPnumber]);
						SendClientMessageEx(playerid, COLOR_YELLOW, string);
					}

					return 1;
				}
			}
		}
	}
	SendClientMessageEx(playerid, COLOR_GRAD2, "  Message delivery failed...");
	return 1;
}
and:

Код:
CMD:angel(playerid, params[])
{
	if(PlayerInfo[playerid][pAdmin] < 2)
	{
		SendClientMessageEx(playerid, COLOR_GREY, "You are not authorized to use that command!");
		return 1;
	}

	new string[128];
	if(isnull(params)) return SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: /angel [angel text]");

	format(string, sizeof(string), "SMS: %s, Sender: Angel (557)",params);
	if (gTeam[playerid] < 3){SendClientMessageEx(playerid, COLOR_WHITE, string);}
	SendEnemyMessage(COLOR_WHITE, string);
	foreach(Player, i)
	{
		if(gTeam[i] >= 3 && gPlayerSpawned[i])
		{
			RingTone[i] =20;
		}
	}
	return 1;
}
and:

Код:
CMD:devil(playerid, params[])
{
	if(PlayerInfo[playerid][pAdmin] < 2)
	{
		SendClientMessageEx(playerid, COLOR_GREY, "You are not authorized to use that command!");
		return 1;
	}

	new string[128];
	if(isnull(params)) return SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: /devil [devil text]");

	format(string, sizeof(string), "SMS: %s, Sender: Devil (556)",params);
	if (gTeam[playerid] < 3){SendClientMessageEx(playerid, COLOR_TWRED, string);}
	SendEnemyMessage(COLOR_TWRED, string);
	foreach(Player, i)
	{
		if(gTeam[i] >= 3 && gPlayerSpawned[i])
		{
			RingTone[i] =20;
		}
	}
	return 1;
}
Reply
#5

pawn Код:
if(phonenumb == 555)
    {
        if ((strcmp("yes", text, true, strlen(text)) == 0) && (strlen(text) == strlen("yes")))
        {
            SendClientMessageEx(playerid, COLOR_WHITE, "Text message delivered.");
            if (gTeam[playerid] == 2 || gTeam[playerid] == 1)
            {
                SendClientMessageEx(playerid, COLOR_YELLOW, "SMS: DONT SMS ME BITCH!, Sender: MOLE (555)");
                RingTone[playerid] = 20;
                return 1;
            }
            return 1;
        }
        else
        {
            SendClientMessageEx(playerid, COLOR_YELLOW, "SMS: DONT SMS ME BITCH!, Sender: MOLE (555)");
            RingTone[playerid] = 20;
            return 1;
        }
You are forgetting to close every copy of this snippet.
Reply
#6

Quote:
Originally Posted by mamorunl
Посмотреть сообщение
pawn Код:
if(phonenumb == 555)
    {
        if ((strcmp("yes", text, true, strlen(text)) == 0) && (strlen(text) == strlen("yes")))
        {
            SendClientMessageEx(playerid, COLOR_WHITE, "Text message delivered.");
            if (gTeam[playerid] == 2 || gTeam[playerid] == 1)
            {
                SendClientMessageEx(playerid, COLOR_YELLOW, "SMS: DONT SMS ME BITCH!, Sender: MOLE (555)");
                RingTone[playerid] = 20;
                return 1;
            }
            return 1;
        }
        else
        {
            SendClientMessageEx(playerid, COLOR_YELLOW, "SMS: DONT SMS ME BITCH!, Sender: MOLE (555)");
            RingTone[playerid] = 20;
            return 1;
        }
You are forgetting to close every copy of this snippet.
Can fix it please?
btw, rep +1
Reply
#7

he corrected
Reply
#8

Quote:
Originally Posted by Nivniv2
Посмотреть сообщение
Can fix it please?
btw, rep +1
You know how brackets work, right? You also (should) know how indentation works. Every opening bracket HAS to have a closing bracket matching. So, after every piece of that stuff add a closing bracket and you are done.
Reply
#9

Quote:
Originally Posted by mamorunl
Посмотреть сообщение
You know how brackets work, right? You also (should) know how indentation works. Every opening bracket HAS to have a closing bracket matching. So, after every piece of that stuff add a closing bracket and you are done.
Actully i dont know how its works
please, can you?
Reply
#10

Brackets are the fundamentals of every piece of code. It is grouping stuff together:

if(a) {
// a is true
} else {
// a is false
}

doing:
if(a) {
if(b) {
somestatement;
}

give you a lot of errors as if(b) is not closed.

and no, I am not going to do the dirty work if you don't understand what I am doing. That is why I am explaining it until you do know it and can do it yourself
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)