07.08.2010, 14:28
Hello,
I am trying to setup a business system, but I want it to read the business to see if the player is the owner of the business so he can sell it if he wants to.
For some reason the way I do it doesn't work.
The Errors I get are listed below:
C:\Documents and Settings\Admin\Desktop\Vortex\VortexRoleplay\gamem odes\VortexRoleplay.pwn(12636) : error 033: array must be indexed (variable "playername")
C:\Documents and Settings\Admin\Desktop\Vortex\VortexRoleplay\gamem odes\VortexRoleplay.pwn(12636) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Admin\Desktop\Vortex\VortexRoleplay\gamem odes\VortexRoleplay.pwn(12837) : warning 217: loose indentation
C:\Documents and Settings\Admin\Desktop\Vortex\VortexRoleplay\gamem odes\VortexRoleplay.pwn(12870) : warning 217: loose indentation
C:\Documents and Settings\Admin\Desktop\Vortex\VortexRoleplay\gamem odes\VortexRoleplay.pwn(28492) : warning 217: loose indentation
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
2 Errors.
Could anybody help me?
I am trying to setup a business system, but I want it to read the business to see if the player is the owner of the business so he can sell it if he wants to.
For some reason the way I do it doesn't work.
pawn Код:
new Confirmation[7], playername[MAX_PLAYER_NAME];
GetPlayerName( playerid, playername, sizeof( playername ) );
if( sscanf( params, "z", Confirmation) )
{
SendClientMessage( playerid, WHITE, "Are you SURE you want to abandon your business? Please type /abandonbusiness confirm" );
}
else
{
if(strcmp(Confirmation, "Confirm", true) == 0 )
{
for(new i = 0; i < sizeof(Businesses); i++)
{
if( IsPlayerInRangeOfPoint( playerid, 3, Businesses[i][bExteriorX], Businesses[i][bExteriorY], Businesses[i][bExteriorZ]) )
{
if( playername == Businesses[i][bOwner] ) )
{
format(Businesses[i][bOwner], 255, "Nobody" );
Businesses[i][bLockStatus] = 1;
SendClientMessage( playerid, WHITE, "You have now abandoned your business." );
SaveBusiness(i);
Player[playerid][Business] = Player[playerid][Business]-1;
}
}
}
}
}
C:\Documents and Settings\Admin\Desktop\Vortex\VortexRoleplay\gamem odes\VortexRoleplay.pwn(12636) : error 033: array must be indexed (variable "playername")
C:\Documents and Settings\Admin\Desktop\Vortex\VortexRoleplay\gamem odes\VortexRoleplay.pwn(12636) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Admin\Desktop\Vortex\VortexRoleplay\gamem odes\VortexRoleplay.pwn(12837) : warning 217: loose indentation
C:\Documents and Settings\Admin\Desktop\Vortex\VortexRoleplay\gamem odes\VortexRoleplay.pwn(12870) : warning 217: loose indentation
C:\Documents and Settings\Admin\Desktop\Vortex\VortexRoleplay\gamem odes\VortexRoleplay.pwn(28492) : warning 217: loose indentation
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
2 Errors.
Could anybody help me?