Empty Statement?
#1

PHP код:
CMD:buyhouse(playerid,params[])
{
    new 
hid GetHouseID(playerid);
    new 
price HouseInfo[hid][HPrice];
    if(
GetPlayerMoney(playerid) < price) return SendFM(playeridCOLOR_WHITE""COL_RED"SERVER"COL_WHITE":You can't buy this house it is too expensive for you! House Price %d",price);<<<<==9735
    
if(HouseInfo[hid][HOwned] == 1) return SendClientMessage(playerid,-1,""COLOR_RED"SERVER"COL_WHITE"You can't buy this house because it is already bought!"); <<<----9736
    
if(HouseInfo[hid][HOwnerID] == pinfo[playerid][ID]) return SendClientMessage(playerid, -1""COL_RED"You can't buy your own house!");    
    
HouseBuy(playerid);
    return 
1;

Errors :
pawn Код:
mysql.pwn(9735) : error 029: invalid expression, assumed zero
mysql.pwn(9735) : error 036: empty statement
mysql.pwn(9736) : error 001: expected token: "-string end-", but found "-identifier-"
mysql.pwn(9736) : warning 215: expression has no effect
mysql.pwn(9736) : error 001: expected token: ";", but found "-string-"
mysql.pwn(9736) : warning 215: expression has no effect
mysql.pwn(9736) : error 001: expected token: ";", but found ")"
mysql.pwn(9736) : fatal error 107: too many error messages on one line
Reply
#2

Wich line is 9736?
Reply
#3

PHP код:
if(HouseInfo[hid][HOwned] == 1) return SendClientMessage(playerid,-1,""COLOR_RED"SERVER"COL_WHITE"You can't buy this house because it is already bought!"); <<<----9736 
I Can't find anything wrong to be honest.
Reply
#4

Show stock SendFM
Reply
#5

try this!

PHP код:
CMD:buyhouse(playerid,params[])
{
    new 
hid GetHouseID(playerid);
    new 
price HouseInfo[hid][HPrice];
    if(
GetPlayerMoney(playerid) < price) return SendFM(playeridCOLOR_WHITE"COL_RED"SERVER"COL_WHITE":You can't buy this house it is too expensive for you! House Price %d",price);
    if(HouseInfo[hid][HOwned] == 1) return SendClientMessage(playerid,-1,"COLOR_RED"SERVER"COL_WHITE"You can'
t buy this house because it is already bought!");
    if(HouseInfo[hid][HOwnerID] == pinfo[playerid][ID]) return SendClientMessage(playerid, -1, "
COL_RED"You can't buy your own house!");    
    
HouseBuy(playerid);
    return 
Reply
#6

Can I see the defines of COL_RED and COL_WHITE?
Reply
#7

I think the problem is outside this. Put this command inside /* */ to check if there's any missing bracket outside or something.
Reply
#8

Found a mistake:

if(HouseInfo[hid][HOwned] == 1) return SendClientMessage(playerid,-1,""COLOR_RED"SERVER"COL_WHITE"You can't buy this house because it is already bought!"); <<<----9736

You wrote COLOR_RED, change it to COL_RED
Reply
#9

Quote:
Originally Posted by ATGOggy
Посмотреть сообщение
Found a mistake:

if(HouseInfo[hid][HOwned] == 1) return SendClientMessage(playerid,-1,""COLOR_RED"SERVER"COL_WHITE"You can't buy this house because it is already bought!"); <<<----9736

You wrote COLOR_RED, change it to COL_RED
Mabye he defined it as COLOR_RED
Reply
#10

Means the error in line 36 is fixed?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)