12.09.2012, 13:43
(
Last edited by maxmax1; 17/09/2012 at 07:42 PM.
)
Finaly i got it work. Good tutorial. That tutorial showed me, i must read more about Y_ini and other scripting stuff.
C:\Users\Winseven\Desktop\Samp\Pro RP SAMP Server\filterscripts\Testbiz.pwn(70) : error 010: invalid function or declaration
C:\Users\Winseven\Desktop\Samp\Pro RP SAMP Server\filterscripts\Testbiz.pwn(73) : error 021: symbol already defined: "INI_ParseFile"
C:\Users\Winseven\Desktop\Samp\Pro RP SAMP Server\filterscripts\Testbiz.pwn(73) : error 010: invalid function or declaration
C:\Users\Winseven\Desktop\Samp\Pro RP SAMP Server\filterscripts\Testbiz.pwn(73 -- 77) : error 010: invalid function or declaration
C:\Users\Winseven\Desktop\Samp\Pro RP SAMP Server\filterscripts\Testbiz.pwn(73 -- 77) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
5 Errors.
new szStr[40];
for(new idx =1 ; idx < sizeof(BusinessInfo); idx++)//Creates a loop, that goes through all of the businesses.
{
format(str, sizeof(str), BPATH, idx);//formats the file path, with the biz ID
INI_ParseFile(str, "loadbiz_%s", .bExtra = true, .extra = idx );
BusinessInfo[idx][bOutsideIcon] = CreateDynamicPickup(1272, 1, BusinessInfo[idx][bEntranceX], BusinessInfo[idx][bEntranceY], BusinessInfo[idx][bEntranceZ], BusinessInfo[idx][bWorld]);
BusinessInfo[idx][bInsideIcon] = CreateDynamicPickup(1272, 1, BusinessInfo[idx][bExitX], BusinessInfo[idx][bExitY], BusinessInfo[idx][bExitZ], BusinessInfo[idx][bInsideWorld]);
}
for(new id = 1; id < sizeof(BusinessInfo); id++)//Loops through the businesses.
{
if(BusinessInfo[id][bPrice] == 0) break;//Breaks the loop if the price is 0(Meaning it doesn't exist)
SaveBusiness(id);//Calls the SaveBusiness function.
}
: error 047: array sizes do not match, or destination array is too small : error 047: array sizes do not match, or destination array is too small
//enums
enum bInfo
{
bOwned,
bPrice,
bOwner[MAX_PLAYER_NAME],
bType,
bLocked,
bMoney,
Float:bEntranceX,
Float:bEntranceY,
Float:bEntranceZ,
Float:bEntranceA,
Float:bExitX,
Float:bExitY,
Float:bExitZ,
Float:bExitA,
bInt,
bWorld,
bInsideInt,
bInsideWorld,
bInsideIcon,
bOutsideIcon,
bName[128]
}
new BusinessInfo[200][bInfo];
//loading
forward loadbiz_data(idx, name[], value[]);
public loadbiz_data(idx, name[], value[])
{
INI_Int("bOwned", BusinessInfo[idx][bOwned]);
INI_Int("bPrice", BusinessInfo[idx][bPrice]);
INI_String("bOwner", BusinessInfo[idx][bOwner], 24); // this is error 1
INI_Int("bType", BusinessInfo[idx][bType]);
INI_Int("bLocked", BusinessInfo[idx][bLocked]);
INI_Int("bMoney", BusinessInfo[idx][bMoney]);
INI_Float("bEntranceX", BusinessInfo[idx][bEntranceX]);
INI_Float("bEntranceY", BusinessInfo[idx][bEntranceY]);
INI_Float("bEntranceZ", BusinessInfo[idx][bEntranceZ]);
INI_Float("bEntranceA", BusinessInfo[idx][bEntranceA]);
INI_Float("bExitX", BusinessInfo[idx][bExitX]);
INI_Float("bExitY", BusinessInfo[idx][bExitY]);
INI_Float("bExitZ", BusinessInfo[idx][bExitZ]);
INI_Float("bExitA", BusinessInfo[idx][bExitA]);
INI_Int("bInt", BusinessInfo[idx][bInt]);
INI_Int("bWorld", BusinessInfo[idx][bWorld]);
INI_Int("bInsideInt", BusinessInfo[idx][bInsideInt]);
INI_Int("bInsideWorld", BusinessInfo[idx][bInsideWorld]);
INI_String("bName", BusinessInfo[idx][bName], 128); // this is error 2
return 1;
}
D:\Games\Stunt Server By Johnny\pawno\include\YSI\y_debug.inc(277) : warning 219: local variable "str" shadows a variable at a preceding level D:\Games\Stunt Server By Johnny\pawno\include\YSI\y_debug.inc(339) : warning 219: local variable "str" shadows a variable at a preceding level D:\Games\Stunt Server By Johnny\pawno\include\YSI\y_debug.inc(344) : warning 219: local variable "str" shadows a variable at a preceding level D:\Games\Stunt Server By Johnny\pawno\include\YSI\y_amx.inc(454) : warning 219: local variable "str" shadows a variable at a preceding level D:\Games\Stunt Server By Johnny\pawno\include\YSI\y_amx.inc(904) : warning 219: local variable "str" shadows a variable at a preceding level D:\Games\Stunt Server By Johnny\pawno\include\YSI\y_amx.inc(926) : warning 219: local variable "str" shadows a variable at a preceding level D:\Games\Stunt Server By Johnny\pawno\include\YSI\y_utils.inc(246) : warning 219: local variable "str" shadows a variable at a preceding level D:\Games\Stunt Server By Johnny\pawno\include\YSI\y_utils.inc(369) : warning 219: local variable "str" shadows a variable at a preceding level D:\Games\Stunt Server By Johnny\pawno\include\YSI\y_utils.inc(396) : warning 219: local variable "str" shadows a variable at a preceding level D:\Games\Stunt Server By Johnny\pawno\include\YSI\y_utils.inc(475) : warning 219: local variable "str" shadows a variable at a preceding level D:\Games\Stunt Server By Johnny\pawno\include\YSI\y_commands.inc(219) : warning 201: redefinition of constant/macro (symbol "CMD:%0(%1)") D:\Games\Stunt Server By Johnny\pawno\include\YSI\y_commands.inc(220) : warning 201: redefinition of constant/macro (symbol "COMMAND") D:\Games\Stunt Server By Johnny\pawno\include\YSI\y_malloc.inc(488) : warning 219: local variable "str" shadows a variable at a preceding level D:\Games\Stunt Server By Johnny\pawno\include\YSI\y_malloc.inc(613) : warning 219: local variable "str" shadows a variable at a preceding level D:\Games\Stunt Server By Johnny\pawno\include\YSI\y_ini.inc(1074) : warning 219: local variable "str" shadows a variable at a preceding level D:\Games\Stunt Server By Johnny\pawno\include\YSI\y_ini.inc(1192) : warning 219: local variable "str" shadows a variable at a preceding level C:\DOCUME~1\MITACH~1\Desktop\LuxAdmin.pwn(114) : error 010: invalid function or declaration C:\DOCUME~1\MITACH~1\Desktop\LuxAdmin.pwn(141) : error 010: invalid function or declaration C:\DOCUME~1\MITACH~1\Desktop\LuxAdmin.pwn(144) : error 021: symbol already defined: "INI_ParseFile" C:\DOCUME~1\MITACH~1\Desktop\LuxAdmin.pwn(144) : error 017: undefined symbol "bExtra" C:\DOCUME~1\MITACH~1\Desktop\LuxAdmin.pwn(144) : warning 201: redefinition of constant/macro (symbol "COLOR_BLUE") C:\DOCUME~1\MITACH~1\Desktop\LuxAdmin.pwn(144 -- 165) : warning 201: redefinition of constant/macro (symbol "COLOR_PURPLE") C:\DOCUME~1\MITACH~1\Desktop\LuxAdmin.pwn(144 -- 166) : warning 201: redefinition of constant/macro (symbol "COLOR_BLACK") C:\DOCUME~1\MITACH~1\Desktop\LuxAdmin.pwn(373) : error 001: expected token: "}", but found "-identifier-" C:\DOCUME~1\MITACH~1\Desktop\LuxAdmin.pwn(374) : error 010: invalid function or declaration C:\DOCUME~1\MITACH~1\Desktop\LuxAdmin.pwn(520) : warning 219: local variable "str" shadows a variable at a preceding level C:\DOCUME~1\MITACH~1\Desktop\LuxAdmin.pwn(525) : error 017: undefined symbol "CreateDynamicPickup" C:\DOCUME~1\MITACH~1\Desktop\LuxAdmin.pwn(526) : error 017: undefined symbol "CreateDynamicPickup" C:\DOCUME~1\MITACH~1\Desktop\LuxAdmin.pwn(1756) : warning 235: public function lacks forward declaration (symbol "OnPlayerPickUpDynamicPickup") C:\DOCUME~1\MITACH~1\Desktop\LuxAdmin.pwn(1931) : error 017: undefined symbol "DestroyDynamicPickup" C:\DOCUME~1\MITACH~1\Desktop\LuxAdmin.pwn(1932) : error 017: undefined symbol "DestroyDynamicPickup" C:\DOCUME~1\MITACH~1\Desktop\LuxAdmin.pwn(1933) : error 017: undefined symbol "CreateDynamicPickup" C:\DOCUME~1\MITACH~1\Desktop\LuxAdmin.pwn(1934) : error 017: undefined symbol "CreateDynamicPickup" C:\DOCUME~1\MITACH~1\Desktop\LuxAdmin.pwn(1988) : error 017: undefined symbol "DestroyDynamicPickup" C:\DOCUME~1\MITACH~1\Desktop\LuxAdmin.pwn(1999) : error 017: undefined symbol "PlayerInfo" C:\DOCUME~1\MITACH~1\Desktop\LuxAdmin.pwn(1999) : warning 215: expression has no effect C:\DOCUME~1\MITACH~1\Desktop\LuxAdmin.pwn(1999) : error 001: expected token: ";", but found "]" C:\DOCUME~1\MITACH~1\Desktop\LuxAdmin.pwn(1999) : error 029: invalid expression, assumed zero C:\DOCUME~1\MITACH~1\Desktop\LuxAdmin.pwn(1999) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 17 Errors.
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if (PRESSED(KEY_SECONDARY_ATTACK))
{
for(new b = 1; b < sizeof(BusinessInfo); b++)//Loops through all the businesses.
{
if(IsPlayerInRangeOfPoint(playerid, 1.0, BusinessInfo[b][bEntranceX], BusinessInfo[b][bEntranceY], BusinessInfo[b][bEntranceZ]))//Checks if player is near the entrance.
{
if(BusinessInfo[b][bLocked] == 1) return SendClientMessage(playerid, COLOR_GREY, "This Business is locked!");//Checks it it is locked/
SetPlayerPos(playerid, BusinessInfo[b][bExitX], BusinessInfo[b][bExitY], BusinessInfo[b][bExitZ]);
SetPlayerFacingAngle(playerid, BusinessInfo[b][bExitA]);
SetPlayerInterior(playerid, BusinessInfo[b][bInsideInt]);
SetPlayerVirtualWorld(playerid, BusinessInfo[b][bInsideWorld]);
InsideBiz[playerid] = b;
return 1;
}
if(IsPlayerInRangeOfPoint(playerid, 2.0, BusinessInfo[b][bExitX], BusinessInfo[b][bExitY], BusinessInfo[b][bExitZ]) && GetPlayerVirtualWorld(playerid) == BusinessInfo[b][bInsideWorld])//Checks if player is in near the exit.
{
SetPlayerPos(playerid, BusinessInfo[b][bEntranceX], BusinessInfo[b][bEntranceY], BusinessInfo[b][bEntranceZ]);
SetPlayerFacingAngle(playerid, BusinessInfo[b][bEntranceA]);
SetPlayerInterior(playerid, BusinessInfo[b][bInt]);
SetPlayerVirtualWorld(playerid, BusinessInfo[b][bWorld]);
InsideBiz[playerid] = 0;
return 1;
}
}
}
return 1;
}
#include <YSI\y_commands>
#include <zcmd>
F:\Mustafa\Dutch-RealLife\gamemodes\Haci.pwn(1396) : warning 213: tag mismatch F:\Mustafa\Dutch-RealLife\gamemodes\Haci.pwn(1444) : warning 213: tag mismatch F:\Mustafa\Dutch-RealLife\gamemodes\Haci.pwn(1446) : error 017: undefined symbol "Money" F:\Mustafa\Dutch-RealLife\gamemodes\Haci.pwn(1448) : warning 213: tag mismatch F:\Mustafa\Dutch-RealLife\gamemodes\Haci.pwn(1449) : error 017: undefined symbol "Money" F:\Mustafa\Dutch-RealLife\gamemodes\Haci.pwn(1454) : error 017: undefined symbol "RemoveUnderScore" F:\Mustafa\Dutch-RealLife\gamemodes\Haci.pwn(1475) : warning 213: tag mismatch F:\Mustafa\Dutch-RealLife\gamemodes\Haci.pwn(1476) : warning 213: tag mismatch F:\Mustafa\Dutch-RealLife\gamemodes\Haci.pwn(1484) : error 017: undefined symbol "Money" F:\Mustafa\Dutch-RealLife\gamemodes\Haci.pwn(1488) : error 017: undefined symbol "Skin" F:\Mustafa\Dutch-RealLife\gamemodes\Haci.pwn(1663) : warning 203: symbol is never used: "sellbiz" Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 5 Errors.
F:\Mustafa\Dutch-RealLife\gamemodes\Haci.pwn(1396) : warning 213: tag mismatch F:\Mustafa\Dutch-RealLife\gamemodes\Haci.pwn(1444) : warning 213: tag mismatch F:\Mustafa\Dutch-RealLife\gamemodes\Haci.pwn(1448) : warning 213: tag mismatch F:\Mustafa\Dutch-RealLife\gamemodes\Haci.pwn(1461) : warning 213: tag mismatch F:\Mustafa\Dutch-RealLife\gamemodes\Haci.pwn(1462) : warning 213: tag mismatch F:\Mustafa\Dutch-RealLife\gamemodes\Haci.pwn(1467) : warning 213: tag mismatch F:\Mustafa\Dutch-RealLife\gamemodes\Haci.pwn(1475) : warning 213: tag mismatch F:\Mustafa\Dutch-RealLife\gamemodes\Haci.pwn(1476) : warning 213: tag mismatch Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 8 Warnings.