Imam neki bug sa lotto ne mogu da compilam kod.
Compiling "c:\Users\Zoki\Desktop\Balkanium Roleplay v1.0\gamemodes\balkan-premium.pwn"...
c:\Users\Zoki\Desktop\Balkanium Roleplay v1.0\gamemodes\balkan-premium.pwn(13521) : warning 213: tag mismatch
c:\Users\Zoki\Desktop\Balkanium Roleplay v1.0\gamemodes\balkan-premium.pwn(86228) : error 017: undefined symbol "serverInfo"
c:\Users\Zoki\Desktop\Balkanium Roleplay v1.0\gamemodes\balkan-premium.pwn(86228) : warning 215: expression has no effect
c:\Users\Zoki\Desktop\Balkanium Roleplay v1.0\gamemodes\balkan-premium.pwn(86228) : error 001: expected token: ";", but found "]"
c:\Users\Zoki\Desktop\Balkanium Roleplay v1.0\gamemodes\balkan-premium.pwn(86228) : error 029: invalid expression, assumed zero
c:\Users\Zoki\Desktop\Balkanium Roleplay v1.0\gamemodes\balkan-premium.pwn(86228) : fatal error 107: too many error messages on one line
Compilation aborted.
Pawn compiler 3.10.4 Copyright (c) 1997-2006, ITB CompuPhase
4 Errors.
CMD:donirajlotto(playerid, params[])
{
new novac;
if(sscanf(params, "d", novac)) return UsageMessage(playerid, "/donirajlotto [novac]");
if(novac > 100000) return ErrorMessage(playerid, "Maksimalno 100.000$.");
if(novac < 1000) return ErrorMessage(playerid, "Minimalno 1000$.");
if(PI[playerid][xNovac] < novac) return ErrorMessage(playerid, "Nemate dovoljno novca kod sebe.");
serverInfo[LottoDonacije] += novac;
format(globalstring, sizeof(globalstring), "[ LOTTO ] %s je donirao $%d lottu.", ImeIgraca(playerid), novac);
SCMA(-1, globalstring);
UpdateLottoLabel(serverInfo, ImeIgraca(playerid));
return 1;
}
stock UpdateLottoLabel(const serverInfo[], const ime[])
{
new lotto[256];
format(lotto, sizeof(lotto), "%s[ Lotto ]\n%sDa uplatite lotto listic %s/lotto\n%sDa donirate lottu: %s/donirajlotto\n%sLotto donacije: %d$\n%sZadnji donator: %s%s", col_ugblue, col_white, col_blue, col_white, col_blue, col_white, serverInfo[LottoDonacije], col_green, col_white, ime);
UpdateDynamic3DTextLabelText(LottoLabel, -1, lotto);
return 1;
}
Inace mi znamo koja je koja linija zar ne ???
u kodu pise da 'serverInfo' nije definisan. pogledan u modu kako je definisano Ctrl+F pa upisi serverinfo.
I posalji liniju koda za prvi warning
Treba nam kompletan kod za ovo, mozda mogu ti i ja pomoci sa ovime, iako ucim programski jezik. Dao si nam samo neke definicije neceg.
Citat: kaze poslato Maj 21, 2023, 11:16:29 PRE PODNE
u kodu pise da 'serverInfo' nije definisan. pogledan u modu kako je definisano Ctrl+F pa upisi serverinfo.
I posalji liniju koda za prvi warning
Compiling "c:\Users\Mihajlo\Desktop\Balkanium Roleplay v1.0\gamemodes\balkanium-premium.pwn"...
c:\Users\Zoki\Desktop\Balkanium Roleplay v1.0\gamemodes\balkan-premium.pwn(13518) : warning 219: local variable "ServerInfo" shadows a variable at a preceding level
c:\Users\Zoki\Desktop\Balkanium Roleplay v1.0\gamemodes\balkan-premium.pwn(13521) : warning 213: tag mismatch
c:\Users\Zoki\Desktop\Balkanium Roleplay v1.0\gamemodes\balkan-premium.pwn(86231) : warning 229: index tag mismatch (symbol "ServerInfo")
Pawn compiler 3.10.4 Copyright (c) 1997-2006, ITB CompuPhase
Header size: 42332 bytes
Code size: 6986288 bytes
Data size: 81699604 bytes
Stack/heap size: 16384 bytes; estimated max. usage=4418 cells (17672 bytes)
Total requirements:88744608 bytes
3 Warnings.
stock UpdateLottoLabel(const ServerInfo[], const ime[])
format(lotto, sizeof(lotto), "%s[ Lotto ]\n%sDa uplatite lotto listic %s/lotto\n%sDa donirate lottu: %s/donirajlotto\n%sLotto donacije: %d$\n%sZadnji donator: %s%s", col_ugblue, col_white, col_blue, col_white, col_blue, col_white, ServerInfo[LottoDonacije], col_green, col_white, ime);
UpdateLottoLabel(ServerInfo, ImeIgraca(playerid));
Citat: Maid_Corbic poslato Maj 21, 2023, 11:37:18 PRE PODNE
Treba nam kompletan kod za ovo, mozda mogu ti i ja pomoci sa ovime, iako ucim programski jezik. Dao si nam samo neke definicije neceg.
link=topic=144026.msg1048002#msg1048002 date=1684670418]
Compiling "c:\Users\Mihajlo\Desktop\Balkanium Roleplay v1.0\gamemodes\balkanium-premium.pwn"...
c:\Users\Zoki\Desktop\Balkanium Roleplay v1.0\gamemodes\balkan-premium.pwn(13518) : warning 219: local variable "ServerInfo" shadows a variable at a preceding level
c:\Users\Zoki\Desktop\Balkanium Roleplay v1.0\gamemodes\balkan-premium.pwn(13521) : warning 213: tag mismatch
c:\Users\Zoki\Desktop\Balkanium Roleplay v1.0\gamemodes\balkan-premium.pwn(86231) : warning 229: index tag mismatch (symbol "ServerInfo")
Pawn compiler 3.10.4 Copyright (c) 1997-2006, ITB CompuPhase
Header size: 42332 bytes
Code size: 6986288 bytes
Data size: 81699604 bytes
Stack/heap size: 16384 bytes; estimated max. usage=4418 cells (17672 bytes)
Total requirements:88744608 bytes
3 Warnings.
stock UpdateLottoLabel(const ServerInfo[], const ime[])
format(lotto, sizeof(lotto), "%s[ Lotto ]\n%sDa uplatite lotto listic %s/lotto\n%sDa donirate lottu: %s/donirajlotto\n%sLotto donacije: %d$\n%sZadnji donator: %s%s", col_ugblue, col_white, col_blue, col_white, col_blue, col_white, ServerInfo[LottoDonacije], col_green, col_white, ime);
UpdateLottoLabel(ServerInfo, ImeIgraca(playerid));
[/quote]
I mod koji koristim je balkan premium 1.0 od bunte
[pawn]CMD:donirajlotto(playerid, params[])
{
new novac;
if(sscanf(params, "d", novac)) return UsageMessage(playerid, "/donirajlotto [novac]");
if(novac > 100000) return ErrorMessage(playerid, "Maksimalno 100.000$.");
if(novac < 1000) return ErrorMessage(playerid, "Minimalno 1000$.");
if(PI[playerid][xNovac] < novac) return ErrorMessage(playerid, "Nemate dovoljno novca kod sebe.");
ServerInfo[LottoDonacije] += novac;
format(globalstring, sizeof(globalstring), "[ LOTTO ] %s je donirao $%d lottu.", ImeIgraca(playerid), novac);
SCMA(-1, globalstring);
UpdateLottoLabel(serverInfo, ImeIgraca(playerid));
return 1;
}[/pawn]
Probaj ovo
[pawn]format(lotto, sizeof(lotto), ""col_ugblue"[ Lotto ]\n"col_white"Da uplatite lotto listic "col_blue"/lotto\n"col_white"Da donirate lottu: "col_blue"/donirajlotto\n"col_white"Lotto donacije: %d$\n"col_green"Zadnji donator:"col_white" %s", ServerInfo[LottoDonacije], ime);[/pawn]
Neaktivno, lock!