Jump to content
  • 0

YSI / INI ERROR


ImTouchk

Question

Problema intalnita (descriere): Cand compilez un gamemode simplu, doar inregistrare/logare fara comenzi imi da eroare la public LoadUser_Data.
Ero(area / rile) / warning-(ul / urile):

Spoiler

 


C:\Users\User\Desktop\GAMEMODE DE LA 0\gamemodes\bare.pwn(34) : error 017: undefined symbol "pInfo"
C:\Users\User\Desktop\GAMEMODE DE LA 0\gamemodes\bare.pwn(34) : warning 215: expression has no effect
C:\Users\User\Desktop\GAMEMODE DE LA 0\gamemodes\bare.pwn(34) : error 001: expected token: ";", but found "]"
C:\Users\User\Desktop\GAMEMODE DE LA 0\gamemodes\bare.pwn(34) : error 029: invalid expression, assumed zero
C:\Users\User\Desktop\GAMEMODE DE LA 0\gamemodes\bare.pwn(34) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright (c) 1997-2006, ITB CompuPhase


4 Errors.

 


Liniile de cod / sursa / script-ul(obligatoriu):

Spoiler

forward LoadUser_data(playerid,name[],value[]);
public LoadUser_data(playerid,name[],value[])
{
	INI_Int("pPassword",pInfo[playerid][pPass]);
	INI_Int("pMoney",pInfo[playerid][pMoney]);
	INI_Int("pAdmin",pInfo[playerid][pAdmin]);
    INI_Int("pAccDeaths",pInfo[playerid][pDeaths]);
    INI_Int("pBankMoney",pInfo[playerid][pBank]);
    INI_Int("pMask",pInfo[playerid][pMask]);
    INI_Int("pTester",pInfo[playerid][pTester]);
    INI_Int("pDonator",pInfo[playerid][pDonator]);
    INI_Int("pJailed",pInfo[playerid][pJailed]);
    INI_Int("pAjailed",pInfo[playerid][pAjailed]);
    INI_Int("pMutted",pInfo[playerid][pMutted]);
    INI_Int("pMminutes",pInfo[playerid][pMminutes]);
    INI_Int("pCuffed",pInfo[playerid][pCuffed]);
    INI_Int("pLeader",pInfo[playerid][pLeader]);
    INI_Int("pBanned",pInfo[playerid][pBanned]);
    INI_Int("pCellphone",pInfo[playerid][pCellPhone]);
    INI_Int("pHouse",pInfo[playerid][pHouse]);
    INI_Int("pBiz",pInfo[playerid][pHouse]);
 	return 1;
}

 

Imagini / Video (optional): -
Ati incercat sa rezolvati singur?: Da, tin sa precizez ca am facut si enum-ul pInfo.

:D

Link to comment
Share on other sites

8 answers to this question

Recommended Posts

  • 0

Probabil aveai deja enumul, tu ai luat de undeva acel public LoadUser_data(playerid,name[],value[]) ? ai incercat sa schimbi in gm? poate aveai PlayerInfo, sau PlayerVariable, verifica cum ai la comenzi si posteaza liniile cumprinse intre 30-36

 

    __  ____      __           
   /  |/  (_)____/ /____  _____
  / /|_/ / / ___/ __/ _ \/ ___/
 / /  / / (__  ) /_/  __/ /    
/_/  /_/_/____/\__/\___/_/     
SERVICII SCRIPTING DE CALITATE
Pagina     Scripting     pawn
Link to comment
Share on other sites

  • 0

pPassword este linia 34 iar pAdmin este linia 36.

forward LoadUser_data(playerid,name[],value[]);
public LoadUser_data(playerid,name[],value[])
{
	INI_Int("pPassword",pInfo[playerid][pPass]);
	INI_Int("pMoney",pInfo[playerid][pMoney]);
	INI_Int("pAdmin",pInfo[playerid][pAdmin]);
    INI_Int("pAccDeaths",pInfo[playerid][pDeaths]);
    INI_Int("pBankMoney",pInfo[playerid][pBank]);
    INI_Int("pMask",pInfo[playerid][pMask]);
    INI_Int("pTester",pInfo[playerid][pTester]);
    INI_Int("pDonator",pInfo[playerid][pDonator]);
    INI_Int("pJailed",pInfo[playerid][pJailed]);
    INI_Int("pAjailed",pInfo[playerid][pAjailed]);
    INI_Int("pMutted",pInfo[playerid][pMutted]);
    INI_Int("pMminutes",pInfo[playerid][pMminutes]);
    INI_Int("pCuffed",pInfo[playerid][pCuffed]);
    INI_Int("pLeader",pInfo[playerid][pLeader]);
    INI_Int("pBanned",pInfo[playerid][pBanned]);
    INI_Int("pCellphone",pInfo[playerid][pCellPhone]);
    INI_Int("pHouse",pInfo[playerid][pHouse]);
    INI_Int("pBiz",pInfo[playerid][pHouse]);
 	return 1;
}

Enumul este denumit pInfo.

enum pInfo {
    pAdmin,
    pTester,
    pCuffed,
    pMutted,
    pFaction,
    pLeader,
    pAjailed,
    pJailed,
    pMoney,
    pLoggedIn,
    pSpawn,
    pHouse,
    pBank,
    pMminutes,
    pDonator,
    pHouse,
    pBiz,
    pCellphone,
    pMask,
    pBanned,
    pPass,
    pDeaths,
    pFactionRank
}

Da, este luat de la un tutorial Login & Register acel INI doar cu pPassword, pKills si pDeaths, eu l-am modificat intru-totul.

Am pus enum fInfo si enum pInfo inainte de acel INI, acum acesta ajunsese de la linia 63 pana la 85, acum imi da urmatoarele erori:

C:\Users\User\Desktop\GAMEMODE DE LA 0\gamemodes\bare.pwn(46) : error 021: symbol already defined: "pHouse"
C:\Users\User\Desktop\GAMEMODE DE LA 0\gamemodes\bare.pwn(66) : error 028: invalid subscript (not an array or too many subscripts): "pInfo"
C:\Users\User\Desktop\GAMEMODE DE LA 0\gamemodes\bare.pwn(66) : warning 215: expression has no effect
C:\Users\User\Desktop\GAMEMODE DE LA 0\gamemodes\bare.pwn(66) : error 001: expected token: ";", but found "]"
C:\Users\User\Desktop\GAMEMODE DE LA 0\gamemodes\bare.pwn(66) : error 029: invalid expression, assumed zero
C:\Users\User\Desktop\GAMEMODE DE LA 0\gamemodes\bare.pwn(66) : 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.
 

C:\Users\User\Desktop\GAMEMODE DE LA 0\gamemodes\bare.pwn(46) : error 021: symbol already defined: "pHouse"
C:\Users\User\Desktop\GAMEMODE DE LA 0\gamemodes\bare.pwn(66) : error 028: invalid subscript (not an array or too many subscripts): "pInfo"
C:\Users\User\Desktop\GAMEMODE DE LA 0\gamemodes\bare.pwn(66) : warning 215: expression has no effect
C:\Users\User\Desktop\GAMEMODE DE LA 0\gamemodes\bare.pwn(66) : error 001: expected token: ";", but found "]"
C:\Users\User\Desktop\GAMEMODE DE LA 0\gamemodes\bare.pwn(66) : error 029: invalid expression, assumed zero
C:\Users\User\Desktop\GAMEMODE DE LA 0\gamemodes\bare.pwn(66) : 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.

 

Edited by ImTouchk

:D

Link to comment
Share on other sites

  • 0
  • 0
  • 0
1 hour ago, WiDuAlK said:

atunci pune ; la urma, cand inchei acolada


 

C:\Users\User\Desktop\GAMEMODE DE LA 0\gamemodes\bare.pwn(46) : error 021: symbol already defined: "pHouse"
C:\Users\User\Desktop\GAMEMODE DE LA 0\gamemodes\bare.pwn(66) : error 028: invalid subscript (not an array or too many subscripts): "pInfo"
C:\Users\User\Desktop\GAMEMODE DE LA 0\gamemodes\bare.pwn(66) : warning 215: expression has no effect
C:\Users\User\Desktop\GAMEMODE DE LA 0\gamemodes\bare.pwn(66) : error 001: expected token: ";", but found "]"
C:\Users\User\Desktop\GAMEMODE DE LA 0\gamemodes\bare.pwn(66) : error 029: invalid expression, assumed zero
C:\Users\User\Desktop\GAMEMODE DE LA 0\gamemodes\bare.pwn(66) : 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.

 

Edited by ImTouchk

:D

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.