Creating Stocks Is Giving Me errors - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Creating Stocks Is Giving Me errors (
/showthread.php?tid=400364)
Creating Stocks Is Giving Me errors -
Windrush - 18.12.2012
pawn Код:
stock IsPlayerOwnedHouse(playerid)
{
for(new i = 0; i < MAX_HOUSES;i++)//Loop threw all houses.
{
new pName[24];
GetPlayerName(playerid,pName,sizeof(pName));
HInfo[i][Owned] == 1 && strcmp(HInfo[i][Owner],pName) == 0
return 1;
}
return 1;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == DIALOG_MHOUSE)
{
switch(listitem)
{
case 0:
{
if(IsPlayerOwnedHouse(playerid))
{
ShowPlayerDialog(playerid,DIALOG_MHOUSE2,DIALOG_STYLE_INPUT,"{00FF00}House System","Type Your New Name Of Your House","Finish","Close");
}
}
case 1:
{
SellHouse(playerid);
}
}
}
return 1;
}
pawn Код:
C:\Users\carlo\Desktop\SA-MP Server\RolePlay\filterscripts\MyOwnhouses.pwn(236 -- 237) : warning 215: expression has no effect
C:\Users\carlo\Desktop\SA-MP Server\RolePlay\filterscripts\MyOwnhouses.pwn(237) : error 001: expected token: ";", but found "return"
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
1 Error.
Re: Creating Stocks Is Giving Me errors -
Konstantinos - 18.12.2012
pawn Код:
stock IsPlayerOwnedHouse(playerid)
{
new pName[24];
GetPlayerName(playerid,pName,sizeof(pName));
if(HInfo[playerid][Owned] == 1 && strcmp(HInfo[playerid][Owner],pName) == 0)
{
return 1;
}
return 0;
}
Re: Creating Stocks Is Giving Me errors -
Windrush - 18.12.2012
@******: Yess!! btw Fixed by Dwane
@Dwane: Tnx.. I Can't Rep YOu