01.10.2010, 20:04
error :
script :
Код:
C:\SAMP0~1.3BR\GAMEMO~1\gf.pwn(10782) : error 017: undefined symbol "playername" C:\SAMP0~1.3BR\GAMEMO~1\gf.pwn(10782) : error 017: undefined symbol "playername" C:\SAMP0~1.3BR\GAMEMO~1\gf.pwn(10782) : error 029: invalid expression, assumed zero C:\SAMP0~1.3BR\GAMEMO~1\gf.pwn(10782) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 4 Errors.
Код:
CMD:rentroom(playerid, params[]) { 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(GetPlayerMoney(playerid) > HouseInfo[h][hRent]) { PlayerInfo[playerid][pPhousekey] = h; GivePlayerMoney(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."); SavePlayerData(playerid); return 1; } else { SendClientMessage(playerid, COLOR_WHITE, "You don't have the cash for that"); return 1; } } } } return 1; }