SA-MP Forums Archive
inconsistent return types (array & non-array) error help. - 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: inconsistent return types (array & non-array) error help. (/showthread.php?tid=353970)



inconsistent return types (array & non-array) error help. - rangerxxll - 25.06.2012

Hello everyone. For some reason I keep getting these errors. I've been converting dini to Y_INI, and I'm getting these errors. They claim something is wrong with my loaduserdata callback. It looks fine to me, so if you guys know what's up then any assistance would be greatly appreciated. Thanks.
Код:
C:\Users\Luke\Desktop\Scratch Roleplay\gamemodes\ScratchRP.pwn(404) : error 079: inconsistent return types (array & non-array)
C:\Users\Luke\Desktop\Scratch Roleplay\gamemodes\ScratchRP.pwn(405) : error 079: inconsistent return types (array & non-array)
C:\Users\Luke\Desktop\Scratch Roleplay\gamemodes\ScratchRP.pwn(406) : error 079: inconsistent return types (array & non-array)
C:\Users\Luke\Desktop\Scratch Roleplay\gamemodes\ScratchRP.pwn(407) : error 079: inconsistent return types (array & non-array)
C:\Users\Luke\Desktop\Scratch Roleplay\gamemodes\ScratchRP.pwn(408) : error 079: inconsistent return types (array & non-array)
C:\Users\Luke\Desktop\Scratch Roleplay\gamemodes\ScratchRP.pwn(409) : error 079: inconsistent return types (array & non-array)
C:\Users\Luke\Desktop\Scratch Roleplay\gamemodes\ScratchRP.pwn(410) : error 079: inconsistent return types (array & non-array)
C:\Users\Luke\Desktop\Scratch Roleplay\gamemodes\ScratchRP.pwn(411) : error 079: inconsistent return types (array & non-array)
C:\Users\Luke\Desktop\Scratch Roleplay\gamemodes\ScratchRP.pwn(412) : error 079: inconsistent return types (array & non-array)
C:\Users\Luke\Desktop\Scratch Roleplay\gamemodes\ScratchRP.pwn(413) : error 079: inconsistent return types (array & non-array)
C:\Users\Luke\Desktop\Scratch Roleplay\gamemodes\ScratchRP.pwn(414) : error 079: inconsistent return types (array & non-array)
C:\Users\Luke\Desktop\Scratch Roleplay\gamemodes\ScratchRP.pwn(415) : error 079: inconsistent return types (array & non-array)
C:\Users\Luke\Desktop\Scratch Roleplay\gamemodes\ScratchRP.pwn(416) : error 079: inconsistent return types (array & non-array)
C:\Users\Luke\Desktop\Scratch Roleplay\gamemodes\ScratchRP.pwn(417) : error 079: inconsistent return types (array & non-array)
C:\Users\Luke\Desktop\Scratch Roleplay\gamemodes\ScratchRP.pwn(418) : error 079: inconsistent return types (array & non-array)
C:\Users\Luke\Desktop\Scratch Roleplay\gamemodes\ScratchRP.pwn(419) : error 079: inconsistent return types (array & non-array)
C:\Users\Luke\Desktop\Scratch Roleplay\gamemodes\ScratchRP.pwn(420) : error 079: inconsistent return types (array & non-array)
C:\Users\Luke\Desktop\Scratch Roleplay\gamemodes\ScratchRP.pwn(421) : error 079: inconsistent return types (array & non-array)
C:\Users\Luke\Desktop\Scratch Roleplay\gamemodes\ScratchRP.pwn(422) : error 079: inconsistent return types (array & non-array)
C:\Users\Luke\Desktop\Scratch Roleplay\gamemodes\ScratchRP.pwn(423) : error 017: undefined symbol "pDonatePoints"
C:\Users\Luke\Desktop\Scratch Roleplay\gamemodes\ScratchRP.pwn(423) : error 079: inconsistent return types (array & non-array)
C:\Users\Luke\Desktop\Scratch Roleplay\gamemodes\ScratchRP.pwn(424) : error 079: inconsistent return types (array & non-array)
C:\Users\Luke\Desktop\Scratch Roleplay\gamemodes\ScratchRP.pwn(425) : error 079: inconsistent return types (array & non-array)
C:\Users\Luke\Desktop\Scratch Roleplay\gamemodes\ScratchRP.pwn(426) : error 079: inconsistent return types (array & non-array)
C:\Users\Luke\Desktop\Scratch Roleplay\gamemodes\ScratchRP.pwn(427) : error 079: inconsistent return types (array & non-array)
C:\Users\Luke\Desktop\Scratch Roleplay\gamemodes\ScratchRP.pwn(428) : error 079: inconsistent return types (array & non-array)

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


26 Errors.
pawn Код:
forward LoadUser_data(playerid,name[],value[]); //Register system, load user data
public LoadUser_data(playerid,name[],value[])
{
    INI_Int("Password",PlayerInfo[playerid][pPassword]);
    INI_Int("Registered",PlayerInfo[playerid][pRegistered]);
    INI_Int("Age",PlayerInfo[playerid][pAge]);
    INI_Int("Gender",PlayerInfo[playerid][pGender]);
    INI_Int("Skin",PlayerInfo[playerid][pSkin]);
    INI_Int("Origin",PlayerInfo[playerid][pOrigin]);
    INI_Int("Accent",PlayerInfo[playerid][pAccent]);
    INI_Int("AdminLevel",PlayerInfo[playerid][pAdminLevel]);
    INI_Int("Health",PlayerInfo[playerid][pHealth]);
    INI_Int("Armour",PlayerInfo[playerid][pArmour]);
    INI_Int("Money",PlayerInfo[playerid][pMoney]);
    INI_Int("Bank",PlayerInfo[playerid][pBank]);
    INI_Int("Job",PlayerInfo[playerid][pJob]);
    INI_Int("Faction",PlayerInfo[playerid][pFaction]);
    INI_Int("Rank",PlayerInfo[playerid][pRank]);
    INI_Int("License",PlayerInfo[playerid][pLicense]);
    INI_Int("Cocaine",PlayerInfo[playerid][pCocaine]);
    INI_Int("Marijuana",PlayerInfo[playerid][pMarijuana]);
    INI_Int("Donater",PlayerInfo[playerid][pDonater]);
    INI_Int("DonatePoints",PlayerInfo[playerid][pDonatePoints]);
    INI_Int("Watch",PlayerInfo[playerid][pWatch]);
    INI_Int("Phone",PlayerInfo[playerid][pPhone]);
    INI_Int("Phonenumber",PlayerInfo[playerid][pPhoneNumber]);
    INI_Int("House",PlayerInfo[playerid][pHouse]);
    INI_Int("Cigars",PlayerInfo[playerid][pCigars]);
    INI_Int("Lighter",PlayerInfo[playerid][pLighter]);
    INI_Int("Mask",PlayerInfo[playerid][pMask]);
    INI_Int("JailTime",PlayerInfo[playerid][pJailTime]);
    INI_Int("Leader",PlayerInfo[playerid][pLeader]);
   
    //Weapons
   
    INI_Int("Gun01",PlayerInfo[playerid][pGun01]);
    INI_Int("Ammo01",PlayerInfo[playerid][pAmmo01]);
    INI_Int("Gun02",PlayerInfo[playerid][pGun02]);
    INI_Int("Ammo02",PlayerInfo[playerid][pAmmo02]);
    INI_Int("Gun03",PlayerInfo[playerid][pGun03]);
    INI_Int("Ammo03",PlayerInfo[playerid][pAmmo03]);
    INI_Int("Gun04",PlayerInfo[playerid][pGun04]);
    INI_Int("Ammo04",PlayerInfo[playerid][pAmmo04]);
    INI_Int("Gun05",PlayerInfo[playerid][pGun05]);
    INI_Int("Ammo05",PlayerInfo[playerid][pAmmo05]);
    INI_Int("Gun06",PlayerInfo[playerid][pGun06]);
    INI_Int("Ammo07",PlayerInfo[playerid][pAmmo07]);
    INI_Int("Gun08",PlayerInfo[playerid][pGun08]);
    INI_Int("Ammo08",PlayerInfo[playerid][pAmmo08]);
    INI_Int("Gun09",PlayerInfo[playerid][pGun09]);
    INI_Int("Ammo09",PlayerInfo[playerid][pAmmo09]);
    INI_Int("Gun10",PlayerInfo[playerid][pGun10]);
    INI_Int("Ammo10",PlayerInfo[playerid][pAmmo10]);
    INI_Int("Gun11",PlayerInfo[playerid][pGun11]);
    INI_Int("Ammo11",PlayerInfo[playerid][pAmmo11]);
   
    //Last x y z pos
   
    INI_Int("LastX",PlayerInfo[playerid][pLastX]);
    INI_Int("LastY",PlayerInfo[playerid][pLastY]);
    INI_Int("LastZ",PlayerInfo[playerid][pLastZ]);



Re: inconsistent return types (array & non-array) error help. - Dubya - 25.06.2012

This is My version. I'm not sure what is wrong with your's but, make sure you have the Latest Y_INI, and try to copy my Ini_Int's and edit them to yours. But, I'm not sure.
pawn Код:
forward LoadUser_data(playerid,name[],value[]);
public LoadUser_data(playerid,name[],value[])
{
    INI_Int("Password",PlayerInfo[playerid][pPass]);
    INI_Int("Cash",PlayerInfo[playerid][pCash]);
    INI_Int("Admin",PlayerInfo[playerid][pAdmin]);
    INI_Int("Kills",PlayerInfo[playerid][pKills]);
    INI_Int("Deaths",PlayerInfo[playerid][pDeaths]);
    INI_Int("Muted",PlayerInfo[playerid][pMuted]);
    INI_Int("Banned",PlayerInfo[playerid][pBanned]);
    INI_Int("ReportBanned",PlayerInfo[playerid][pReportBanned]);
    INI_Int("PlayingHours",PlayerInfo[playerid][pConnectedTime]);
    INI_Int("LSPD",PlayerInfo[playerid][pLSPD]);
    return 1;
}



Re: inconsistent return types (array & non-array) error help. - rangerxxll - 25.06.2012

Hm. I don't think my enum would effect it... (Would it?)
pawn Код:
enum pInfo
{
    pPassword,
    pRegistered,
    pAge,
    pGender,
    pSkin,
    pOrigin,
    pAccent,
    pAdminLevel,
    Float:pHealth,
    Float:pArmour,
    pMoney,
    pBank,
    pJob,
    pFaction,
    pRank,
    pLicense,
    pCocaine,
    pMarijuana,
    pDonater,
    pDonaterPoints,
    pWatch,
    pPhone,
    pPhoneNumber,
    pHouse,
    pCigars,
    pLighter,
    pMask,
    pJailTime,
    pGun01,
    pAmmo01,
    pGun02,
    pAmmo02,
    pGun03,
    pAmmo03,
    pGun04,
    pAmmo04,
    pGun05,
    pAmmo05,
    pGun06,
    pAmmo06,
    pGun07,
    pAmmo07,
    pGun08,
    pAmmo08,
    pGun09,
    pAmmo09,
    pGun11,
    pAmmo11,
    pLeader,
    Float:pLastX,
    Float:pLastY,
    Float:pLastZ
}
I honestly don't know what else it can be. I'll try to update YSI, but that's all I can do right now.

EDIT: Just realized I forgot to return it. Testing now



Re: inconsistent return types (array & non-array) error help. - SWEMike - 25.06.2012

For the floating point variables, use INI_Float.