help!! 4errors case - 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: help!! 4errors case (
/showthread.php?tid=504552)
help!! 4errors case -
Slicebook - 04.04.2014
Код:
D:\Mбtй kйpei\RPG\26febrmof\icerpg.pwn(13356) : error 014: invalid statement; not in switch
D:\Mбtй kйpei\RPG\26febrmof\icerpg.pwn(13356) : warning 215: expression has no effect
D:\Mбtй kйpei\RPG\26febrmof\icerpg.pwn(13356) : error 001: expected token: ";", but found ":"
D:\Mбtй kйpei\RPG\26febrmof\icerpg.pwn(13356) : error 029: invalid expression, assumed zero
D:\Mбtй kйpei\RPG\26febrmof\icerpg.pwn(13356) : fatal error 107: too many error messages on one line
Код:
case 2: <<<error
{
new Haz = IsAt(playerid,IsAt_HazElott);
if(Haz != NINCS)
{
new tulaj = ReturnUser(HouseInfo[Haz][hOwner]);
if(tulaj != NINCS)
{
if(Csengo[tulaj])
}
Cselekves(playerid,"megnyomta a csengőt",0);
}
else
{
Msg(playerid,"Nem vagy hбz bejбratбnбl!");
}
return 1;
}
case 1 and case 0
Код:
else if( dialogid == DIALOG_HOUSEM )
{
if(!response) return 1;
if(response)
{
switch(listitem)
{
case 0:
{
BementIdo[playerid] = 3;
new hazak = sizeof(HouseInfo);
// new PlayerVW = GetPlayerVirtualWorld(playerid), PlayerInt = GetPlayerInterior(playerid);
if(IsAt(playerid,IsAt_HazElott) != NINCS)
{
for(new i = 0; i < hazak; i++)
{
if (PlayerToPoint(1, playerid,HouseInfo[i][hEntrancex], HouseInfo[i][hEntrancey], HouseInfo[i][hEntrancez]))
{
if(HouseInfo[i][hLock] == 0)
{
new HazBelso = HouseInfo[i][hBelso];
SetPlayerInterior(playerid,IntInfo[HazBelso][iNumber]);
SetPlayerPos(playerid,IntInfo[HazBelso][iExitX],IntInfo[HazBelso][iExitY],IntInfo[HazBelso][iExitZ]);
SetPlayerVirtualWorld(playerid, i);
GameTextForPlayer(playerid, "~w~Ьdv itt!", 5000, 1);
PlayerInfo[playerid][pLocal] = i;
Hazbanvan[playerid] = 1;
new zseka = Fbios[playerid];
SendFormatMessage(zseka, Pink, "PDA Ьzenet: %s bement a %d szбmъ hбzba.", PlayerName(playerid), i)
SetPlayerMarkerForPlayer(zseka, playerid, COLOR_INVISIBLE);
// return 1;
}
else
{
GameTextForPlayer(playerid, "~r~Zarva", 5000, 1);
return 1;
}
}
}
}
}
case 1:
{
BementIdo[playerid] = 3;
new hazak = sizeof(HouseInfo);
if(IsAt(playerid,IsAt_HazElott) != NINCS)
for(new i = 0; i < hazak; i++)
if(PlayerToPoint(1, playerid,HouseInfo[i][hEntrancex], HouseInfo[i][hEntrancey], HouseInfo[i][hEntrancez]))
if(HouseInfo[i][hDrog] != 1) return Msg(playerid,"A hбzban nincs droglabor!");
SetPlayerVirtualWorld(playerid, 0);
SetPlayerPos(playerid,1253.2783,-1701.6456,6319.3672);
Freeze(playerid,5000);
GameTextForPlayer(playerid, "~w~Ьdv itt!", 2000, 1);
PlayerInfo[playerid][pLocal] = 0;
Hazbanvan[playerid] = 1;
}
}
}
}
case 2:
{
new Haz = IsAt(playerid,IsAt_HazElott);
if(Haz != NINCS)
{
new tulaj = ReturnUser(HouseInfo[Haz][hOwner]);
if(tulaj != NINCS)
{
if(Csengo[tulaj])
SendClientMessage(tulaj,COLOR_LIGHTGREEN,"Csengő Jelző: Csengetett valaki a hбzadnбl! Menj oda!");
}
Cselekves(playerid,"megnyomta a csengőt",0);
}
else
{
Msg(playerid,"Nem vagy hбz bejбratбnбl!");
}
return 1;
}
Re: help!! 4errors case -
CoaPsyFactor - 04.04.2014
Try this
Код:
else if (dialogid == DIALOG_HOUSEM) {
if (!response)
return 1;
if (response) {
switch (listitem) {
case 0: {
BementIdo[playerid] = 3;
new hazak = sizeof(HouseInfo);
// new PlayerVW = GetPlayerVirtualWorld(playerid), PlayerInt = GetPlayerInterior(playerid);
if (IsAt(playerid, IsAt_HazElott) != NINCS) {
for(new i = 0;
i < hazak;
i++) {
if (PlayerToPoint(1, playerid, HouseInfo[i][hEntrancex], HouseInfo[i][hEntrancey], HouseInfo[i][hEntrancez])) {
if(HouseInfo[i][hLock] == 0) {
new HazBelso = HouseInfo[i][hBelso];
SetPlayerInterior(playerid, IntInfo[HazBelso][iNumber]);
SetPlayerPos(playerid, IntInfo[HazBelso][iExitX], IntInfo[HazBelso][iExitY], IntInfo[HazBelso][iExitZ]);
SetPlayerVirtualWorld(playerid, i);
GameTextForPlayer(playerid, "~w~Ьdv itt!", 5000, 1);
PlayerInfo[playerid][pLocal] = i;
Hazbanvan[playerid] = 1;
new zseka = Fbios[playerid];
SendFormatMessage(zseka, Pink, "PDA Ьzenet: %s bement a %d szбmъ hбzba.", PlayerName(playerid), i)
SetPlayerMarkerForPlayer(zseka, playerid, COLOR_INVISIBLE);
// return 1;
} else {
GameTextForPlayer(playerid, "~r~Zarva", 5000, 1);
return 1;
}
}
}
}
}
case 1: {
BementIdo[playerid] = 3;
new hazak = sizeof(HouseInfo);
if (IsAt(playerid, IsAt_HazElott) != NINCS)
for (new i = 0;
i < hazak;
i++)
if(PlayerToPoint(1, playerid, HouseInfo[i][hEntrancex], HouseInfo[i][hEntrancey], HouseInfo[i][hEntrancez]))
if(HouseInfo[i][hDrog] != 1) return Msg(playerid, "A hбzban nincs droglabor!");
SetPlayerVirtualWorld(playerid, 0);
SetPlayerPos(playerid, 1253.2783, -1701.6456, 6319.3672);
Freeze(playerid, 5000);
GameTextForPlayer(playerid, "~w~Ьdv itt!", 2000, 1);
PlayerInfo[playerid][pLocal] = 0;
Hazbanvan[playerid] = 1;
}
case 2: {
new Haz = IsAt(playerid, IsAt_HazElott);
if (Haz != NINCS) {
new tulaj = ReturnUser(HouseInfo[Haz][hOwner]);
if (tulaj != NINCS) {
if (Csengo[tulaj])
SendClientMessage(tulaj, COLOR_LIGHTGREEN, "Csengő Jelző: Csengetett valaki a hбzadnбl! Menj oda!");
}
Cselekves(playerid, "megnyomta a csengőt", 0);
}
else {
Msg(playerid, "Nem vagy hбz bejбratбnбl!");
}
return 1;
}
}
}
}