Problema Compile -
Chucky12324 - 01.07.2014
Salutare , am si eu o mica problema cu gm-ul meu .. am incercat sa implementez un fs in gm .. iar cand dau compile imi apar aceste errori
Код:
C:\Users\xxxx\Desktop\strike arena\gamemodes\xxxx.pwn(40145) : warning 219: local variable "AC_BS_GivePlayerMoney" shadows a variable at a preceding level
C:\Users\xxxx\Desktop\strike arena\gamemodes\xxxx.pwn(46797) : warning 219: local variable "hLevel" shadows a variable at a preceding level
C:\Users\xxxx\Desktop\strike arena\gamemodes\xxxx.pwn(46802) : error 022: must be lvalue (non-constant)
C:\Users\xxxx\Desktop\strike arena\gamemodes\xxxx.pwn(46802) : warning 215: expression has no effect
C:\Users\xxxx\Desktop\strike arena\gamemodes\xxxx.pwn(46823) : error 032: array index out of bounds (variable "AHouseInteriors")
C:\Users\xxxx\Desktop\strike arena\gamemodes\xxxx.pwn(46825) : error 032: array index out of bounds (variable "AHouseInteriors")
C:\Users\xxxx\Desktop\strike arena\gamemodes\xxxx.pwn(46797) : warning 203: symbol is never used: "hLevel"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
3 Errors.
Liniile 46823 si 46825
Код:
// Set the player inside the new interior of the house
SetPlayerInterior(OtherPlayer, AHouseInteriors[hLevel][InteriorID]);
// Set the position of the player at the spawn-location of the house's interior
SetPlayerPos(OtherPlayer, AHouseInteriors[hLevel][IntX], AHouseInteriors[hLevel][IntY], AHouseInteriors[hLevel][IntZ]);
Enum-ul
Код:
// Setup a custom type that holds all data about a house-interior (selected when entering a house, based on the house-level)
enum THouseInterior
{
InteriorName[50], // Holds the name of the interior
InteriorID, // Holds the interior-id
Float:IntX, // Holds the X-coordinate of the spawn-location where you enter the house
Float:IntY, // Holds the Y-coordinate of the spawn-location where you enter the house
Float:IntZ // Holds the Z-coordinate of the spawn-location where you enter the house
}
// Holds the data for all interiors for houses (each house-level has it's own interior)
new AHouseInteriors[][THouseInterior] =
{
{"Dummy", 0, 0.0, 0.0, 0.0}, // Dummy interior (Level 0), as the house-level starts at 1
{"Small motel room", 10, 2262.83, -1137.71, 1050.63}, // Level 1
{"Small house", 2, 2467.36, -1698.38, 1013.51}, // Level 2
{"Small house 2", 1, 223.00, 1289.26, 1082.20}, // Level 3
{"Medium house", 10, 2260.76, -1210.45, 1049.02}, // Level 4
{"Medium house 2", 8, 2365.42, -1131.85, 1050.88}, // Level 5
{"Duplex house", 12, 2324.33, -1144.79, 1050.71}, // Level 6
{"Big house", 15, 295.14, 1474.47, 1080.52}, // Level 7
{"Big duplex house", 3, 235.50, 1189.17, 1080.34}, // Level 8
{"Huge house", 7, 225.63, 1022.48, 1084.07}, // Level 9
{"Mansion", 5, 1299.14, -794.77, 1084.00} // Level 10
};
Re: Problema Compile -
DiGiTaL_AnGeL - 01.07.2014
Schimba numele functiilor/variabilelor locale la care primesti erori.
Re: Problema Compile -
Chucky12324 - 01.07.2014
Am incercat, tot aceleleasi erori...
Imi poti da un exemplu' te rog?
Re: Problema Compile -
Smoky94 - 02.07.2014
Si eu am aceiasi problema .. chiar nimeni nu vrea sa ajute ?
Re: Problema Compile -
r0bi - 03.07.2014
Erorile astea
PHP код:
C:\Users\xxxx\Desktop\strike arena\gamemodes\xxxx.pwn(40145) : warning 219: local variable "AC_BS_GivePlayerMoney" shadows a variable at a preceding level
C:\Users\xxxx\Desktop\strike arena\gamemodes\xxxx.pwn(46797) : warning 219: local variable "hLevel" shadows a variable at a preceding level
arata faptul ca
PHP код:
AC_BS_GivePlayerMoney
si
mai sunt odata scrise mai sus in acelasi public, comanda, ce ai tu acolo, adica ai folosit
PHP код:
new AC_BS_GivePlayerMoney
de 2 ori.Eroarea
PHP код:
C:\Users\xxxx\Desktop\strike arena\gamemodes\xxxx.pwn(46797) : warning 203: symbol is never used: "hLevel"
arata faptul ca
nu este folosit in comanda, public! Rezolva erorile astea si dupa revin'o cu ce ai ramas ca sa le rezolvam!
Re: Problema Compile -
Smoky94 - 03.07.2014
Salut robi , multumesc pentru raspunsul tau .. eu am rezolvat toate errorile .. mergea fara probleme sa-i dau compile ma rog .. l-am urcat pe host si nu-mi mai mergea nici o comanda .. asa ca l-am scos din gm .. acum sa-mi caut alt system de case .. imi poti recomanda te rog frumos un fs bun .. care poate fi intregrat in gm ?
Re: Problema Compile -
r0bi - 03.07.2014
Nu ai pentru ce!Din punctul mei de vedere asta este bun
![Cheesy](images/smilies/biggrin.png)
!
https://sampforum.blast.hk/showthread.php?tid=282816