Zaloguj się by uzyskać pełen dostęp. Nie masz jeszcze konta? Założ je już teraz w kilka sekund.
GTAONLINE.PL
Tematy otagowane jako: foreach
1. Foreach
Cze?? mam taki problem, ot?? przy instalacji foreacha po kompilacji wyskakuje mi taki error. To samo si? dzieje, gdy chce na przyk?ad wpisa? include y_iterate.
Pawn
C:UsersKamilDesktoppawnoincludeYSIy_scriptinit.inc(305) : warning 201redefinition of constant/macro (symbol "OnScriptInit")
C:UsersKamilDesktoppawnoincludeYSIy_scriptinit.inc(326) : error 084state conflictone of the states is already assigned to another implementation (symbol "_ScriptInit_FixState")
C:UsersKamilDesktoppawnoincludeYSIy_scriptinit.inc(330) : error 084state conflictone of the states is already assigned to another implementation (symbol "_ScriptInit_FixState")
C:UsersKamilDesktoppawnoincludeYSIy_debug.inc(379) : error 021symbol already defined"ScriptInit_OnScriptInit"
C:UsersKamilDesktoppawnoincludeforeach.inc(663) : error 021symbol already defined"ScriptInit_OnFilterScriptInit"
C:UsersKamilDesktoppawnoincludeforeach.inc(758) : error 021symbol already defined"ScriptInit_OnGameModeInit"
C:UsersKamilDesktopDMgamemodesDM.pwn(498) : error 021symbol already defined"ScriptInit_OnGameModeExit"
Pawn compiler 3.10.8              Copyright (c1997-2006ITB CompuPhase

Za pomoc stawiam piwo.
2. Foreach
Aktualnie robi? pasek stanu dla swojego serwera..

Mam zrobiony lecz mam problem ot?? w fowardzie i publicu z refreshem napotka?em problem sam public wygl?da tak :

[code]forward td_refresh();
public td_refresh()
{
/* ODSWIEZANIE GRACZY ONLINE */
format(td_string, sizeof(td_string), "Online: ~y~%d", Iter_Count(Player));
TextDrawSetString(Online, td_string);

foreach (new playerid : Player)
{
z1 = gettime() - GetPVarInt(playerid, "oTime");
z2 = z1/60;
z3 = z1/3600;

/* ODSWIEZANIE CZASU GRY */
format(td_string, sizeof(td_string), "%02d~y~h ~w~%02d~y~min", z3, z2);
PlayerTextDrawSetString(playerid, Belt_Player[TIME_ONLINE][playerid], td_string);

/* ODSWIEZANIE PIENIEDZY */
format(td_string, sizeof(td_string), "Pieniedzy: ~y~%d~w~$", GetPlayerMoney(playerid));
PlayerTextDrawSetString(playerid, Belt_Player[PLAYER_MONEY][playerid], td_string);

/* ODSWIEZANIE SCORE */
format(td_string, sizeof(td_string), "Respekt: ~y~%d", GetPlayerScore(playerid));
PlayerTextDrawSetString(playerid, Belt_Player[PLAYER_SCORE][playerid], td_string);
}
return 1;
}
[/code]

i mam 4 b??dy podczas kompilacji :

[code]D:Documents and SettingsJaPulpitPolski Gold Partyfilterscriptspstanu.pwn(269) : error 017: undefined symbol "foreach"
D:Documents and SettingsJaPulpitPolski Gold Partyfilterscriptspstanu.pwn(269) : error 029: invalid expression, assumed ...
3. [INNE] Foreach vs For - Co wydajniejsze?
Tak jak w tamacie - kt?re jest wydajniejsze? Z tego co
si? orientuje lepsze jest "for", jednak potrzebne mi pewne
informacje.
4. [INNE] include foreach
Witam ma kto? mo?e includ foreach
poniewa? nie chc? wczyta? mi mapy na 0.3d poniewa? jest jaki? b??d

foreach called
716

Wie kto? co to mo?e by??? includ?