18.10.2017, 00:18
I got this code from a guy in the script help section i tried it but end up with these errors, i was trying to fix it but nothing seems to work, could someone tell me whats wrong here or even give me a fix for it, i will be trying to do some research on the issue still
PHP код:
ResetVariables(playerid)
{
memcpy(pInfo[playerid], pInfo[MAX_PLAYERS], 0, sizeof(pInfo[])*4, pInfo(pInfo[]));
}
/*
./comps/functions.pwn(2449) : warning 229: index tag mismatch (symbol "pInfo")
./comps/functions.pwn(2449) : error 032: array index out of bounds (variable "pInfo")
./comps/functions.pwn(2449) : error 012: invalid function call, not a valid address
./comps/functions.pwn(2449) : error 029: invalid expression, assumed zero
./comps/functions.pwn(2449) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
4 Errors.
*/
PHP код:
memcpy(PlayerTemp[playerid], PlayerTemp[MAX_PLAYERS], 0, sizeof(PlayerTemp[])*4, PlayerTemp(PlayerTemp[]));
/*
./comps/functions.pwn(2450) : error 032: array index out of bounds (variable "PlayerTemp")
./comps/functions.pwn(2450) : error 012: invalid function call, not a valid address
./comps/functions.pwn(2450) : error 029: invalid expression, assumed zero
./comps/functions.pwn(2450) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
4 Errors.
*/
PHP код:
enum ptemps
{
isevent,
afrozen,
OnDuty,
OnhDuty,
LoginAttempts,
Spawned,
MaxRcon,
pSpawnFreeze,
Jetpack,
LastShotTick,
LastShot,
dSpawnedCars,
Blindfold,
antispawn[MAX_PLAYERS],
Family[MAX_PLAYERS],
Cigar[MAX_PLAYERS],
Blindfolded[MAX_PLAYERS],
Rope[MAX_PLAYERS],
Dice[MAX_PLAYERS],
}
new PlayerTemp[MAX_PLAYERS][ptemps];
enum PlayerInfo
{
Pass,
Cash,
Bank,
Admin,
Helper,
Kills,
Deaths,
Score,
Token,
Banned,
PurLot,
LastSpawnedCar,
dCars[MAX_CAR_SPAWNS],
Spec,
Warns,
Frozen,
cTime,
Hours,
Minutes,
Muted,
pMuted,
pHouse,
pVHouse,
VIP,
Plic,
Weplic,
JailedTime,
Jailed,
pBiz,
pVBiz,
perm,
New,
Arrested,
RefPoints,
Gate[3],
pVeh,
vModel,
Float:vX,
Float:vY,
Float:vZ,
Float:vA,
vC1,
vC2,
vPJ,
pVehMod[14],
vLocked,
// 3 Car Slot Begins
pBVeh,
vBModel,
Float:vBX,
Float:vBY,
Float:vBZ,
Float:vBA,
vBC1,
vBC2,
vBPJ,
pBVehMod[14],
vBLocked,
pVVeh,
vVModel,
Float:vVX,
Float:vVY,
Float:vVZ,
Float:vVA,
vVC1,
vVC2,
vVPJ,
pVVehMod[14],
vVLocked,
pFam,
pFamRank
}
new pInfo[MAX_PLAYERS][PlayerInfo];