Deciphering this?
#1

We're trying to figure out why but when this script compiles, it throws us a bunch of Errors.
Here's the command

Код:
	/*if(strcmp(cmd, "/buyhouse", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
			new Float:oldposx, Float:oldposy, Float:oldposz;
			GetPlayerName(playerid, playername, sizeof(playername));
			GetPlayerPos(playerid, oldposx, oldposy, oldposz);
			for(new h = 0; h < sizeof(HouseInfo); h++)
			{
				if(PlayerToPoint(2.0, playerid, HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez]) && HouseInfo[h][hOwned] == 0)
				{
					if(PlayerInfo[playerid][pLevel] < HouseInfo[h][hLevel])
					{
						format(string, sizeof(string), "   You must be Level %d to purchase this !", HouseInfo[h][hLevel]);
						SendClientMessage(playerid, COLOR_GRAD5, string);
						return 1;
					}
					if(PlayerInfo[playerid][pPhousekey] != 255 && strcmp(playername, HouseInfo[PlayerInfo[playerid][pPhousekey]][hOwner], true) == 0)
					{
						SendClientMessage(playerid, COLOR_WHITE, "   You already own a house, type /sellhouse if you want to buy this one !");
						return 1;
					}
					if(GetPlayerCash(playerid) > HouseInfo[h][hValue])
					{
						PlayerInfo[playerid][pPhousekey] = h;
						HouseInfo[h][hOwned] = 1;
						GetPlayerName(playerid, sendername, sizeof(sendername));
						strmid(HouseInfo[h][hOwner], sendername, 0, strlen(sendername), 255);
						GivePlayerCash(playerid,-HouseInfo[h][hValue]);
						PlayerPlayMusic(playerid);
						SetPlayerInterior(playerid,HouseInfo[h][hInt]);
						SetPlayerPos(playerid,HouseInfo[h][hExitx],HouseInfo[h][hExity],HouseInfo[h][hExitz]);
						GameTextForPlayer(playerid, "~w~Welcome Home~n~You can exit at any time by moving to this door and typing /exit", 5000, 3);
						PlayerInfo[playerid][pInt] = HouseInfo[h][hInt];
						PlayerInfo[playerid][pLocal] = h;
						SendClientMessage(playerid, COLOR_WHITE, "Congratulations, on your new Purchase !");
						SendClientMessage(playerid, COLOR_WHITE, "Type /help to review the new property help section !");
                        DateProp(playerid);
						OnPropUpdate();
						//OnPlayerUpdateEx(playerid);
						return 1;
					}
					else
					{
						SendClientMessage(playerid, COLOR_WHITE, "   You don't have the cash for that !");
						return 1;
					}
				}
			}
		}
		return 1;
	}
 if(strcmp(cmd, "/rentroom", true) == 0)
	{
		if(IsPlayerConnected(playerid))
		{
			new Float:oldposx, Float:oldposy, Float:oldposz;
			GetPlayerName(playerid, playername, sizeof(playername));
			GetPlayerPos(playerid, oldposx, oldposy, oldposz);
			for(new h = 0; h < sizeof(HouseInfo); h++)
			{
				if(PlayerToPoint(2.0, playerid, HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez]) && HouseInfo[h][hOwned] == 1 &&  HouseInfo[h][hRentabil] == 1)
				{
					if(PlayerInfo[playerid][pPhousekey] != 255 && strcmp(playername, HouseInfo[PlayerInfo[playerid][pPhousekey]][hOwner], true) == 0)
					{
						SendClientMessage(playerid, COLOR_WHITE, "   You already own a house, type /sellhouse if you want to rent this one.");
						return 1;
					}
					if(GetPlayerCash(playerid) > HouseInfo[h][hRent])
					{
						PlayerInfo[playerid][pPhousekey] = h;
						GivePlayerCash(playerid,-HouseInfo[h][hRent]);
						HouseInfo[h][hTakings] = HouseInfo[h][hTakings]+HouseInfo[h][hRent];
						PlayerPlayMusic(playerid);
						SetPlayerInterior(playerid,HouseInfo[h][hInt]);
						SetPlayerPos(playerid,HouseInfo[h][hExitx],HouseInfo[h][hExity],HouseInfo[h][hExitz]);
						GameTextForPlayer(playerid, "~w~Welcome Home~n~You can exit at any time by moving to this door and typing /exit", 5000, 3);
						PlayerInfo[playerid][pInt] = HouseInfo[h][hInt];
						PlayerInfo[playerid][pLocal] = h;
						SendClientMessage(playerid, COLOR_WHITE, "Congratulations, You can enter and exit here anytime.");
						SendClientMessage(playerid, COLOR_WHITE, "Type /help to review the new property help section.");
						//OnPlayerUpdateEx(playerid);
						return 1;
					}
					else
					{
						SendClientMessage(playerid, COLOR_WHITE, "You don't have the cash for that");
						return 1;
					}
				}
			}
		}
		return 1;
	}*/
Here's the Errors
Код:
C:\SU Gaming Roleplay\gamemodes\SURP.pwn(37115) : error 029: invalid expression, assumed zero
C:\SU Gaming Roleplay\gamemodes\SURP.pwn(37115) : warning 215: expression has no effect
C:\SU Gaming Roleplay\gamemodes\SURP.pwn(37115) : error 001: expected token: ";", but found "if"
C:\SU Gaming Roleplay\gamemodes\SURP.pwn(37124) : error 017: undefined symbol "hEntrancex"
C:\SU Gaming Roleplay\gamemodes\SURP.pwn(37146) : error 017: undefined symbol "hExitx"
C:\SU Gaming Roleplay\gamemodes\SURP.pwn(37152) : error 017: undefined symbol "DateProp"
C:\SU Gaming Roleplay\gamemodes\SURP.pwn(37167) : warning 217: loose indentation
C:\SU Gaming Roleplay\gamemodes\SURP.pwn(37176) : error 017: undefined symbol "hEntrancex"
C:\SU Gaming Roleplay\gamemodes\SURP.pwn(37183) : error 017: undefined symbol "hRent"
C:\SU Gaming Roleplay\gamemodes\SURP.pwn(37186) : error 017: undefined symbol "hRent"
C:\SU Gaming Roleplay\gamemodes\SURP.pwn(37187) : error 017: undefined symbol "hTakings"
C:\SU Gaming Roleplay\gamemodes\SURP.pwn(37190) : error 017: undefined symbol "hExitx"
C:\SU Gaming Roleplay\gamemodes\SURP.pwn(37208) : warning 217: loose indentation
C:\SU Gaming Roleplay\gamemodes\SURP.pwn(37208) : error 029: invalid expression, assumed zero
C:\SU Gaming Roleplay\gamemodes\SURP.pwn(37208 -- 37209) : error 029: invalid expression, assumed zero
C:\SU Gaming Roleplay\gamemodes\SURP.pwn(37209 -- 37210) : error 029: invalid expression, assumed zero
C:\SU Gaming Roleplay\gamemodes\SURP.pwn(37209 -- 37210) : fatal error 107: too many error messages on one line
I'm kinda new to scripting. If you can make this easy to understand or add me on Skype: sugaming and assist through Teamviewer, i would appreciate it.
Reply


Messages In This Thread
Deciphering this? - by DJ_Shocker - 25.09.2012, 02:19
Re: Deciphering this? - by [HK]Ryder[AN] - 25.09.2012, 03:31
Re: Deciphering this? - by ejul - 25.09.2012, 05:45
Re: Deciphering this? - by Skyrise - 25.09.2012, 14:19

Forum Jump:


Users browsing this thread: 2 Guest(s)