Sry wegen Doppelpost, aber es ist sehr wichtig, mein Server crasht andauernd weil jemand /Stats eingibt
und es beschweren sich schon viele, woran kann das liegen *verzweifel* ;(;(
Beiträge von Diabol0
-
-
ich hab das quadrat nirgends, und muss ich endround machen wen ich die alle gespeichert hab ???
-
Versuch mal die drei hier.
if(strcmp(cmd, "/load", true) == 0)
{
if(IsPlayerConnected(playerid))
{
new tmpcar = GetPlayerVehicleID(playerid);
if(!IsATruck(tmpcar))
{
GameTextForPlayer(playerid, "~r~Du bist nicht im Truck", 5000, 1);
return 1;
}
format(string, sizeof(string), "Products: %d/%d.", PlayerHaul[tmpcar][pLoad],PlayerHaul[tmpcar][pCapasity]);
SendClientMessage(playerid, TEAM_GROVE_COLOR, string);
}
return 1;
}
if(strcmp(cmd, "/buyprods", true) == 0)
{
if(IsPlayerConnected(playerid))
{
new tmpcar = GetPlayerVehicleID(playerid);
new compcost = 50;
if(PlayerToPoint(60.0, playerid, -53.3220,-1140.0674,1.0781))
{
if(!IsATruck(tmpcar))
{
if(PlayerHaul[tmpcar][pLoad] < PlayerHaul[tmpcar][pCapasity])
{
new amount;
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD1, "Benutze: /buyprods [Summe]");
return 1;
}
amount = strval(tmp);
if(amount < 1 || amount > 500) { SendClientMessage(playerid, COLOR_GREY, " Produktvergabe 1 - 500"); return 1; }
new check= PlayerHaul[tmpcar][pLoad] + amount;
if(check > PlayerHaul[tmpcar][pCapasity])
{
format(string, sizeof(string), " Du brichst das Limit %d, Momentane Produkte: %d.",PlayerHaul[tmpcar][pCapasity],PlayerHaul[tmpcar][pLoad]);
SendClientMessage(playerid, COLOR_GREY, string);
return 1;
}
new cost = amount*compcost;
if(GetPlayerMoney(playerid) >= cost)
{
PlayerHaul[tmpcar][pLoad] += amount;
// format(string, sizeof(string), "Produkte: %d/%d.", PlayerHaul[tmpcar][pLoad],PlayerHaul[tmpcar][pCapasity]);
SendClientMessage(playerid, TEAM_GROVE_COLOR, string);
format(string, sizeof(string), "Du kaufst %d Produkte Kosten: $%d.", amount,cost);
SendClientMessage(playerid, TEAM_GROVE_COLOR, string);
PlayerMoney[playerid] -= cost;
PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
return 1;
}
else
{
format(string, sizeof(string), "You cant afford %d Products at $%d !", amount,cost);
SendClientMessage(playerid, TEAM_GROVE_COLOR, string);
return 1;
}
}
else
{
// format(string, sizeof(string), "Produkte: %d/%d.", PlayerHaul[tmpcar][pLoad],PlayerHaul[tmpcar][pCapasity]);
SendClientMessage(playerid, TEAM_GROVE_COLOR, string);
return 1;
}
}
else
{
SendClientMessage(playerid, TEAM_GROVE_COLOR, " Dies ist kein Lieferwagen.");
return 1;
}
}
}
return 1;
}
if(strcmp(cmd, "/sellprods", true) == 0)
{
new cashmade;
new tmpcar;
if(IsPlayerConnected(playerid))
{
tmpcar = GetPlayerVehicleID(playerid);
if(!IsATruck(tmpcar))
{
GameTextForPlayer(playerid, "~r~Du bist nicht im Lieferwagen", 5000, 1);
return 1;
}
if(PlayerHaul[tmpcar][pLoad] == 0)
{
GameTextForPlayer(playerid, "~r~Fahrzeug ist Leer", 5000, 1);
// format(string, sizeof(string), "Produkte: %d/%d.", PlayerHaul[tmpcar][pLoad],PlayerHaul[tmpcar][pCapasity]);
SendClientMessage(playerid, TEAM_GROVE_COLOR, string);
return 1;
}
for(new i = 0; i < sizeof(BizzInfo); i++)
{
if (PlayerToPoint(10, playerid,BizzInfo[i][bEntranceX], BizzInfo[i][bEntranceY], BizzInfo[i][bEntranceZ]))
{
for(new l = PlayerHaul[tmpcar][pLoad]; l > 0; l--)
{
if(BizzInfo[i][bProducts] == BizzInfo[i][bMaxProducts])
{
GameTextForPlayer(playerid, "~r~Our stores are full", 5000, 1);
format(string, sizeof(string), "Cash Earned $%d.", cashmade);
SendClientMessage(playerid, TEAM_GROVE_COLOR, string);
format(string, sizeof(string), "Products: %d/%d.", PlayerHaul[tmpcar][pLoad],PlayerHaul[tmpcar][pCapasity]);
SendClientMessage(playerid, TEAM_GROVE_COLOR, string);
PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
return 1;
}
if(BizzInfo[i][bPriceProd] > BizzInfo[i][bTill])
{
GameTextForPlayer(playerid, "~r~We Cant Afford The Deal", 5000, 1);
format(string, sizeof(string), "Cash Earned $%d.", cashmade);
SendClientMessage(playerid, TEAM_GROVE_COLOR, string);
format(string, sizeof(string), "Products: %d/%d.", PlayerHaul[tmpcar][pLoad],PlayerHaul[tmpcar][pCapasity]);
SendClientMessage(playerid, TEAM_GROVE_COLOR, string);
PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
return 1;
}
PlayerHaul[tmpcar][pLoad]--;
BizzInfo[i][bProducts]++;
cashmade = cashmade+BizzInfo[i][bPriceProd];
ConsumingMoney[playerid] = 1;
PlayerMoney[playerid] += BizzInfo[i][bPriceProd];
BizzInfo[i][bTill] -= BizzInfo[i][bPriceProd];
if(PlayerHaul[tmpcar][pLoad] == 0)
{
GameTextForPlayer(playerid, "~r~Truck is empty, return to the stock house", 5000, 1);
format(string, sizeof(string), "Cash Earned $%d.", cashmade);
SendClientMessage(playerid, TEAM_GROVE_COLOR, string);
format(string, sizeof(string), "Products: %d/%d.", PlayerHaul[tmpcar][pLoad],PlayerHaul[tmpcar][pCapasity]);
SendClientMessage(playerid, TEAM_GROVE_COLOR, string);
PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
return 1;
}
}
OnPropUpdate();
return 1;
}
}
}
for(new i = 0; i < sizeof(SBizzInfo); i++)
{
if (PlayerToPoint(10, playerid,SBizzInfo[i][sbEntranceX], SBizzInfo[i][sbEntranceY], SBizzInfo[i][sbEntranceZ]))
{
//printf("Found House :%d",i);
for(new l = PlayerHaul[tmpcar][pLoad]; l > 0; l--)
{
if(SBizzInfo[i][sbProducts] == SBizzInfo[i][sbMaxProducts])
{
GameTextForPlayer(playerid, "~r~Our stores are full", 5000, 1);
format(string, sizeof(string), "Cash Earned $%d.", cashmade);
SendClientMessage(playerid, TEAM_GROVE_COLOR, string);
format(string, sizeof(string), "Products: %d/%d.", PlayerHaul[tmpcar][pLoad],PlayerHaul[tmpcar][pCapasity]);
SendClientMessage(playerid, TEAM_GROVE_COLOR, string);
return 1;
}
if(SBizzInfo[i][sbPriceProd] > SBizzInfo[i][sbTill])
{
GameTextForPlayer(playerid, "~r~We Cant Afford The Deal", 5000, 1);
format(string, sizeof(string), "Cash Earned $%d.", cashmade);
SendClientMessage(playerid, TEAM_GROVE_COLOR, string);
format(string, sizeof(string), "Products: %d/%d.", PlayerHaul[tmpcar][pLoad],PlayerHaul[tmpcar][pCapasity]);
SendClientMessage(playerid, TEAM_GROVE_COLOR, string);
return 1;
}
PlayerHaul[tmpcar][pLoad]--;
SBizzInfo[i][sbProducts]++;
cashmade = cashmade+SBizzInfo[i][sbPriceProd];
ConsumingMoney[playerid] = 1;
PlayerMoney[playerid] += SBizzInfo[i][sbPriceProd];
SBizzInfo[i][sbTill] -= SBizzInfo[i][sbPriceProd];
if(PlayerHaul[tmpcar][pLoad] == 0)
{
GameTextForPlayer(playerid, "~r~Truck is empty, return to the stock house", 5000, 1);
format(string, sizeof(string), "Cash Earned $%d.", cashmade);
SendClientMessage(playerid, TEAM_GROVE_COLOR, string);
format(string, sizeof(string), "Products: %d/%d.", PlayerHaul[tmpcar][pLoad],PlayerHaul[tmpcar][pCapasity]);
SendClientMessage(playerid, TEAM_GROVE_COLOR, string);
return 1;
}
}
OnPropUpdate();
return 1;
}
}
GameTextForPlayer(playerid, "~r~To Far From A Business", 5000, 1);
return 1;
} -
kommen immernoch 5 warns, naja vllt crasht server nimmer, danke
[MSIE_newline_end ] was das ?^^// meine warnings
C:\Users\EL_Diabolo\Desktop\Server für GTA 0.3\gamemodes\script.pwn(3411) : warning 235: public function lacks forward declaration (symbol "RemoveRoadblock")
C:\Users\EL_Diabolo\Desktop\Server für GTA 0.3\gamemodes\script.pwn(6130) : warning 209: function "JB_OnPlayerSpawn" should return a value
C:\Users\EL_Diabolo\Desktop\Server für GTA 0.3\gamemodes\script.pwn(16270) : warning 202: number of arguments does not match definition
C:\Users\EL_Diabolo\Desktop\Server für GTA 0.3\gamemodes\script.pwn(19031) : warning 202: number of arguments does not match definition
C:\Users\EL_Diabolo\Desktop\Server für GTA 0.3\gamemodes\script.pwn(11714) : warning 204: symbol is assigned a value that is never used: "Timer"
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhaseHeader size: 11964 bytes
Code size: 1709016 bytes
Data size: 5765148 bytes
Stack/heap size: 16384 bytes; estimated max. usage=5110 cells (20440 bytes)
Total requirements: 7502512 bytes5 Warnings.
// so sieht mein /stats nun aus:
if (strcmp("/stats",cmdtext, true, 5) == 0)
{
if(IsPlayerConnected(playerid))
{
if (gPlayerLogged[playerid] != 0)
{
DialogStats(playerid);
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, " Du bist nicht eingeloggt !");
}
}
return 1;
} -
Ich kriege bei
if (strcmp(cmd, "/stats", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if (gPlayerLogged[playerid] != 0)
{
DialogStats(playerid);
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, " Du bist nicht eingeloggt !");
}
}
return 1;
}
Immer ne Warning und wenn man ingame /stats eingibt crasht der Server -
1. es sind 81 hab aber vorsichtshalber 82 drausgemacht
2. ich hab kein pickup streamer
3. muss da eig in der property zwischen den häusern so ein quadrat hin ? wenn ja wie mach ich das ?
MfG -
Hallo liebe Community,
ich habe ein Problem, und zwar ich habe knapp 81 Häuser in die Property.cfg hinzugefügt, gespeichter und im script dienew HouseInfo[82][hInfo];
Erhöht, beim serverstart zeigt er auch 82 Häuser an, nur findet man die nirgends aufer map
auch per /gotocoords, zeigt der kein Pickup an und nix passiert.
weiss wer woran das liegen könnte ?
Danke im Vorraus
MfG -
Wieso eingerückt^^
Also Error 1:
C:\Users\EL_Diabolo\Desktop\Server für GTA 0.3\gamemodes\script.pwn(7411) : error 029: invalid expression, assumed zero
Zeile im Zusammenhang:if(CurrentMenu = Jobs)
{
switch(row)
{
case 0:
{
if(PlayerInfo[playerid][pAlGeld] != 0)
{
SendClientMessage(playerid, COLOR_GRAD2, "Du bekommst Arbeitslosengeld");
// Fehler zeile return 1;
}
-----------------------------------------------------------------------------------------------------------------------
Error 2:
C:\Users\EL_Diabolo\Desktop\Server für GTA 0.3\gamemodes\script.pwn(7421) : error 014: invalid statement; not in switchZeile im Zusammenhang:
//Fehlerzeile case 1:
{
if(PlayerInfo[playerid][pAlGeld] != 0)
{
SendClientMessage(playerid, COLOR_GRAD2, "Du bekommst Arbeitslosengeld");
return 1;
}
-----------------------------------------------------------------------------------------------------------------------
Error 3:
C:\Users\EL_Diabolo\Desktop\Server für GTA 0.3\gamemodes\script.pwn(7429) : error 001: expected token: ";", but found ":"
Zeile:
//Fehlerzeile case1:Error 4:
C:\Users\EL_Diabolo\Desktop\Server für GTA 0.3\gamemodes\script.pwn(7429) : error 029: invalid expression, assumed zero
Zeile:
case 1:
-----------------------------------------------------------------------------------------------------------------------So das warn die.. hoffe du kannst mir helfen...
-
So sieht mein jetziges menu aus
mit den folgenden Errrors:
C:\Users\EL_Diabolo\Desktop\Server für GTA 0.3\gamemodes\script.pwn(3401) : warning 235: public function lacks forward declaration (symbol "RemoveRoadblock")
C:\Users\EL_Diabolo\Desktop\Server für GTA 0.3\gamemodes\script.pwn(6120) : warning 209: function "JB_OnPlayerSpawn" should return a value
C:\Users\EL_Diabolo\Desktop\Server für GTA 0.3\gamemodes\script.pwn(7392) : warning 211: possibly unintended assignment
C:\Users\EL_Diabolo\Desktop\Server für GTA 0.3\gamemodes\script.pwn(7411) : error 029: invalid expression, assumed zero
C:\Users\EL_Diabolo\Desktop\Server für GTA 0.3\gamemodes\script.pwn(7421) : error 014: invalid statement; not in switch
C:\Users\EL_Diabolo\Desktop\Server für GTA 0.3\gamemodes\script.pwn(7421) : warning 215: expression has no effect
C:\Users\EL_Diabolo\Desktop\Server für GTA 0.3\gamemodes\script.pwn(7421) : error 001: expected token: ";", but found ":"
C:\Users\EL_Diabolo\Desktop\Server für GTA 0.3\gamemodes\script.pwn(7421) : error 029: invalid expression, assumed zero
C:\Users\EL_Diabolo\Desktop\Server für GTA 0.3\gamemodes\script.pwn(7421) : fatal error 107: too many error messages on one lineCompilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
5 Errors.
-
-
-
-
Vielen Vielen Dank
-
-
Zitat
PS: Benutze bei solchen Sachen Notepad ++ damit kann man es gut prüfen
was ist notepad ++
@ Hajime was meinst du damit ?
// Ich habs nun endlich hinbekommen, nur habe ich jezt noch 5 Errors,
C:\Users\EL_Diabolo\Desktop\Server für GTA 0.3\gamemodes\script.pwn(3115) : warning 235: public function lacks forward declaration (symbol "RemoveRoadblock")
C:\Users\EL_Diabolo\Desktop\Server für GTA 0.3\gamemodes\script.pwn(5833) : warning 209: function "JB_OnPlayerSpawn" should return a value
C:\Users\EL_Diabolo\Desktop\Server für GTA 0.3\gamemodes\script.pwn(7105) : warning 211: possibly unintended assignment
C:\Users\EL_Diabolo\Desktop\Server für GTA 0.3\gamemodes\script.pwn(7123) : error 029: invalid expression, assumed zero
C:\Users\EL_Diabolo\Desktop\Server für GTA 0.3\gamemodes\script.pwn(7132) : error 014: invalid statement; not in switch
C:\Users\EL_Diabolo\Desktop\Server für GTA 0.3\gamemodes\script.pwn(7132) : warning 215: expression has no effect
C:\Users\EL_Diabolo\Desktop\Server für GTA 0.3\gamemodes\script.pwn(7132) : error 001: expected token: ";", but found ":"
C:\Users\EL_Diabolo\Desktop\Server für GTA 0.3\gamemodes\script.pwn(7132) : error 029: invalid expression, assumed zero
C:\Users\EL_Diabolo\Desktop\Server für GTA 0.3\gamemodes\script.pwn(7132) : fatal error 107: too many error messages on one lineHier nochmal die aktuelle Datei:
-
-
-
-
-