Roleplay Levels And Respects Error - 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: Roleplay Levels And Respects Error (
/showthread.php?tid=621642)
Roleplay Levels And Respects Error -
Dejan12345 - 13.11.2016
Код:
forward minute();
public minute()
{
foreach(Player, i)
{
new string[128];
if(!IsPlayerConnected(i)) continue; //Ako je igrac konektiran na server igracu se broje payday poeni,ako nije,ne broje se
PlayerInfo[i][pPaytime] ++; //dodaje mu se 1 payday poen
if(PlayerInfo[i][pPaytime] == 30) //Broj payday poena koji igrac mora zadovoljavati da bi dobio placu, mozete promjeniti
{
PlayerInfo[i][pPaytime] = 0;//PayTime mu se vraca na 0
PlayerInfo[i][pRespekti] ++; //kada igrac primi placu dobit ce 1 respekt
new iskustvo = 0, osnova = 0, placa = 0; osnova = 100 + random(99); placa = osnova*PlayerInfo[i][pLevel];//Osnovica place je 100+ random od 99,mozete promjeniti osnovicu po zelji
iskustvo = (PlayerInfo[i][pLevel] * 2) + 2;
format(string,sizeof(string),"Plata, radili ste 30 minuta i zaradili platu u iznosu od $%i", placa);
SendClientMessage(i, COLOR_LIGHTBLUE, string);
GivePlayerMoney(i, plata);
if(PlayerInfo[i][pRespekti] >= iskustvo)
{
PlayerInfo[i][pLevel] ++;
SetPlayerScore(i, PlayerInfo[i][pLevel]);
PlayerInfo[i][pRespekti] = 0;
format(string, sizeof(string), "LEVEL UP | Presli ste na novi level, sada ste level %d", PlayerInfo[i][pLevel]);
SendClientMessage(i, COLOR_LIGHTBLUE, string);
}
}
}
return 1;
}
Errors
Код:
C:\Users\PC\Desktop\Dejanovi folderi\Black Angeles RolePlay\gamemodes\BlackAngeles.pwn(336) : error 017: undefined symbol "foreach"
C:\Users\PC\Desktop\Dejanovi folderi\Black Angeles RolePlay\gamemodes\BlackAngeles.pwn(339) : error 017: undefined symbol "i"
C:\Users\PC\Desktop\Dejanovi folderi\Black Angeles RolePlay\gamemodes\BlackAngeles.pwn(339) : error 024: "break" or "continue" is out of context
C:\Users\PC\Desktop\Dejanovi folderi\Black Angeles RolePlay\gamemodes\BlackAngeles.pwn(340) : error 017: undefined symbol "i"
C:\Users\PC\Desktop\Dejanovi folderi\Black Angeles RolePlay\gamemodes\BlackAngeles.pwn(341) : error 017: undefined symbol "i"
C:\Users\PC\Desktop\Dejanovi folderi\Black Angeles RolePlay\gamemodes\BlackAngeles.pwn(343) : error 017: undefined symbol "i"
C:\Users\PC\Desktop\Dejanovi folderi\Black Angeles RolePlay\gamemodes\BlackAngeles.pwn(344) : error 017: undefined symbol "i"
C:\Users\PC\Desktop\Dejanovi folderi\Black Angeles RolePlay\gamemodes\BlackAngeles.pwn(345) : error 017: undefined symbol "i"
C:\Users\PC\Desktop\Dejanovi folderi\Black Angeles RolePlay\gamemodes\BlackAngeles.pwn(346) : error 017: undefined symbol "i"
C:\Users\PC\Desktop\Dejanovi folderi\Black Angeles RolePlay\gamemodes\BlackAngeles.pwn(348) : error 017: undefined symbol "i"
C:\Users\PC\Desktop\Dejanovi folderi\Black Angeles RolePlay\gamemodes\BlackAngeles.pwn(349) : error 017: undefined symbol "i"
C:\Users\PC\Desktop\Dejanovi folderi\Black Angeles RolePlay\gamemodes\BlackAngeles.pwn(350) : error 017: undefined symbol "i"
C:\Users\PC\Desktop\Dejanovi folderi\Black Angeles RolePlay\gamemodes\BlackAngeles.pwn(352) : error 017: undefined symbol "i"
C:\Users\PC\Desktop\Dejanovi folderi\Black Angeles RolePlay\gamemodes\BlackAngeles.pwn(353) : error 017: undefined symbol "i"
C:\Users\PC\Desktop\Dejanovi folderi\Black Angeles RolePlay\gamemodes\BlackAngeles.pwn(354) : error 017: undefined symbol "i"
C:\Users\PC\Desktop\Dejanovi folderi\Black Angeles RolePlay\gamemodes\BlackAngeles.pwn(355) : error 017: undefined symbol "i"
C:\Users\PC\Desktop\Dejanovi folderi\Black Angeles RolePlay\gamemodes\BlackAngeles.pwn(356) : error 017: undefined symbol "i"
C:\Users\PC\Desktop\Dejanovi folderi\Black Angeles RolePlay\gamemodes\BlackAngeles.pwn(399) : warning 203: symbol is never used: "stats"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
17 Errors.
Re: Roleplay Levels And Respects Error -
Micko123 - 13.11.2016
do you have this on the top of your GM
PHP код:
#include <foreach>
ako nemas reci da ti uploadam
Re: Roleplay Levels And Respects Error -
Dejan12345 - 14.11.2016
i dont have nemam sacu probati
Re: Roleplay Levels And Respects Error -
Dejan12345 - 14.11.2016
i fix foreach but now 2 errors
Код:
C:\Users\PC\Desktop\Dejanovi folderi\Black Angeles RolePlay\gamemodes\BlackAngeles.pwn(351) : error 035: argument type mismatch (argument 2)
C:\Users\PC\Desktop\Dejanovi folderi\Black Angeles RolePlay\gamemodes\BlackAngeles.pwn(359) : error 035: argument type mismatch (argument 2)
C:\Users\PC\Desktop\Dejanovi folderi\Black Angeles RolePlay\gamemodes\BlackAngeles.pwn(402) : warning 203: symbol is never used: "stats"
Re: Roleplay Levels And Respects Error -
SyS - 14.11.2016
which line ?
i assume it is this line
Код:
SendClientMessage(i, COLOR_LIGHTBLUE, string);
COLOR_LIGHTBLUE may be defined as string it should be an integer
Alternately you can do this
Код:
SendClientMessage(i, 0x3333FF, string);
Re: Roleplay Levels And Respects Error -
Dejan12345 - 14.11.2016
tnx bro i fix it