[POMOC] Error kod Hotel Systema

Započeo [CM] BrunoHP, Septembar 24, 2010, 11:40:53 PRE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Sjecate se kako sam u temi Motel trebao kako to napraviti, jedan clan sa foruma mi je pokazao ali time sto je napravio, stvorio error. Rekao je da ce mi dati danas popravljen error, ali to je bilo prije 4 tjedna i vise ne dolazi na MSN. Sada cu vam reci kako izgleda moj sistem i gdje se javlja problem.

Kod forward:
forward UcitajMotel();
forward SacuvajMotel();


Kod new:
new sobeumotelu[11];

Pinfo(izdvojio sam samo pSoba jer o tome govorim):
enum pInfo
{
pSoba
};
new PlayerInfo[MAX_PLAYERS][pInfo];


Kod OnPlayerConnect:
PlayerInfo[playerid][pSoba] = 0;

Kod spawna:
/* -------------------------------------- Motel -------------------------------------- */
       if (PlayerInfo[playerid][pSoba] == 1) //Soba 1
   {
SetPlayerPos(playerid, 98.8528,1179.4883,20.9402);
SetPlayerInterior(playerid,0);
PlayerInfo[playerid][pInt] = 0;
return 1;
   }
   if (PlayerInfo[playerid][pSoba] == 2) //Soba 2
   {
SetPlayerPos(playerid, 98.7300,1171.7739,20.9402);
SetPlayerInterior(playerid,0);
PlayerInfo[playerid][pInt] = 0;
return 1;
   }
   if (PlayerInfo[playerid][pSoba] == 3) //Soba 3
   {
SetPlayerPos(playerid, 98.8566,1162.1509,20.9402);
SetPlayerInterior(playerid,0);
PlayerInfo[playerid][pInt] = 0;
return 1;
   }
   if (PlayerInfo[playerid][pSoba] == 4) //Soba 4
   {
SetPlayerPos(playerid, 99.0185,1178.1738,18.6641);
SetPlayerInterior(playerid,0);
PlayerInfo[playerid][pInt] = 0;
return 1;
   }
   if (PlayerInfo[playerid][pSoba] == 5) //Soba 5
   {
SetPlayerPos(playerid, 98.9961,1170.1553,18.6641);
SetPlayerInterior(playerid,0);
PlayerInfo[playerid][pInt] = 0;
return 1;
   }
   if (PlayerInfo[playerid][pSoba] == 6) //Soba 6
   {
SetPlayerPos(playerid, 98.9636,1163.6509,18.6641);
SetPlayerInterior(playerid,0);
PlayerInfo[playerid][pInt] = 0;
return 1;
   }
   if (PlayerInfo[playerid][pSoba] == 7) //Soba 7
   {
SetPlayerPos(playerid, 86.0440,1162.2635,20.9402);
SetPlayerInterior(playerid,0);
PlayerInfo[playerid][pInt] = 0;
return 1;
   }
   if (PlayerInfo[playerid][pSoba] == 8) //Soba 8
   {
SetPlayerPos(playerid, 78.2655,1162.5160,20.9402);
SetPlayerInterior(playerid,0);
PlayerInfo[playerid][pInt] = 0;
return 1;
   }
   if (PlayerInfo[playerid][pSoba] == 9) //Soba 9
   {
SetPlayerPos(playerid, 68.7173,1162.3577,20.9402);
SetPlayerInterior(playerid,0);
PlayerInfo[playerid][pInt] = 0;
return 1;
   }
   if (PlayerInfo[playerid][pSoba] == 10) //Soba 10
   {
SetPlayerPos(playerid, 84.8236,1162.2186,18.6565);
SetPlayerInterior(playerid,0);
PlayerInfo[playerid][pInt] = 0;
return 1;
   }
   if (PlayerInfo[playerid][pSoba] == 11) //Soba 11
   {
SetPlayerPos(playerid, 76.7669,1162.4476,18.6641);
SetPlayerInterior(playerid,0);
PlayerInfo[playerid][pInt] = 0;
return 1;
   }
   if (PlayerInfo[playerid][pSoba] == 12) //Soba 12
   {
SetPlayerPos(playerid, 70.0784,1162.2688,18.6641);
SetPlayerInterior(playerid,0);
PlayerInfo[playerid][pInt] = 0;
return 1;
   }


OnPlayerRegister:
format(var, 32, "Soba=%d\n",PlayerInfo[playerid][pSoba]);fwrite(hFile, var);

OnPlayerLogin:
if( strcmp( key , "Soba" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pSoba] = strval( val ); }

Komanda(/rentroom, a pravi /rentroom di iznajmljujes kucu je izmjenjen u drugu komandu):
if (strcmp(cmd, "/rentroom", true) == 0)
{
   if(IsPlayerConnected(playerid))
   {
        new ttemp = 0;
           do
{
if(sobeumotelu[ttemp]==0)
{
sobeumotelu[ttemp] = 1;
PlayerInfo[playerid][pSoba] = ttemp;
SacuvajMotel();
break;
}
if(ttemp == 11 && sobeumotelu[ttemp] == 1)
{
SendClientMessage(playerid, COLOR_GRAD, " Sve sobe u hotelu su zauzete!");
break;
}
}
while (temp < 12);
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, "   Niste prijavljeni !");
}
return 1;
   }


Negdje u scripti:
public UcitajMotel()
{
new koordinate[12][64];
new FajlPodaci[128];
new File: file = fopen("motel.ini", io_read);
if(file)
{
fread(file, FajlPodaci);
split(FajlPodaci, koordinate, ',');
new tmot = 0;
while(tmot < 12)
{
sobeumotelu[tmot] = strval(koordinate[tmot]);
tmot++;
}
}
else
{
fopen("motel.ini", io_write);
print("Datoteka motel.ini nije nadjena. Sistem ce sada pokusati stvoriti tu datoteku.");
SacuvajMotel();
}
return 1;
}

public SacuvajMotel()
{
new kstr[128], tpom;
format(kstr, sizeof(kstr), "%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d", for(tpom = 0; tpom < 12; sobeumotelu[tpom], tpom++ ));
new File: file2 = fopen("motel.ini", io_write);
fwrite(file2, kstr);
fclose(file2);
return 1;
}


Errori koji mi se javljaju:
D:\Bruno`s Documents\CroMafia\gamemodes\cmr.pwn(4567) : error 029: invalid expression, assumed zero
D:\Bruno`s Documents\CroMafia\gamemodes\cmr.pwn(4567) : error 001: expected token: ")", but found ";"
D:\Bruno`s Documents\CroMafia\gamemodes\cmr.pwn(4567) : warning 215: expression has no effect
D:\Bruno`s Documents\CroMafia\gamemodes\cmr.pwn(4567) : warning 215: expression has no effect
D:\Bruno`s Documents\CroMafia\gamemodes\cmr.pwn(4567) : error 001: expected token: ";", but found ")"
D:\Bruno`s Documents\CroMafia\gamemodes\cmr.pwn(4567) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase


4 Errors.


To je u redu pod "public SacuvajMotel()":
format(kstr, sizeof(kstr), "%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d", for(tpom = 0; tpom < 12; sobeumotelu[tpom], tpom++ ));
Poslednja Izmena: Septembar 24, 2010, 11:41:50 PRE PODNE od BrunoHP

Po erorma izgleda dasi zaboravio zagradu
Pozivamo vas da se pridruzite Speedtouch zajednici!

Uskriptane organizacije:

FBI , PD, Military, Tehnicari, S.W.A.T. , CNN, Medic

Uskriptane Bande/Mafije:

Balkan Mafia, Terori (Teroristi), MS 13, GSF (Grove Street Families)

SpeedTouch SA:MP RolePlay Server
188.72.226.231:7777




D:\Bruno`s Documents\CroMafia\gamemodes\cmr.pwn(4567) : error 029: invalid expression, assumed zero
D:\Bruno`s Documents\CroMafia\gamemodes\cmr.pwn(4567) : error 001: expected token: ")", but found ";"
D:\Bruno`s Documents\CroMafia\gamemodes\cmr.pwn(4567) : warning 215: expression has no effect
D:\Bruno`s Documents\CroMafia\gamemodes\cmr.pwn(4567) : warning 215: expression has no effect
D:\Bruno`s Documents\CroMafia\gamemodes\cmr.pwn(4567) : error 001: expected token: ";", but found ")"
D:\Bruno`s Documents\CroMafia\gamemodes\cmr.pwn(4567) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664              Copyright (c) 1997-2006, ITB CompuPhase

Vidis da ti nije naslo zagrade i ;    ..... expected token: ")", but found ";"

Pa stavio sam vec zagradu
Poslednja Izmena: Septembar 26, 2010, 18:39:32 POSLE PODNE od BrunoHP