House System error[REP]+
#1

Код:
CMD:napravikucu(playerid,params[])
{
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid,-1,"Nisi admin!");//Proveravamo dali je igrac admin Rcon logiran
new HousePrice,id = HouseCount;//Ovo je za cenu kuce
if(sscanf(params,"i",HousePrice)) return SendClientMessage(playerid,-1,"KORISTI: /napravikucu <cena>");//Provera dali je sve tacno sto se tice igraca(Novac,sintaksa...)
new Float:x,Float:y,Float:z;//Kreiranje podloge za cuvanje polozaja igraca
GetPlayerPos(playerid,x,y,z);//Dobijanje igraceve pozicije i skadistenje istih
HInfo[id][Price] = HousePrice;//Postavljanje cene kuce
HInfo[id][Owned] = 0;//Stavljanje kuce u vlasnistvo = 0
HInfo[id][XPos] = x;//Skladistenje Xpozicije  (Igraca)
HInfo[id][YPos] = y;//Skladistenje Ypozicije  (Igraca)
HInfo[id][ZPos] = z;//Skladistenje Zpozicije  (Igraca)
HInfo[id][VirtualWorld] = GetPlayerVirtualWorld(playerid);
format(HInfo[id][Owner],24,"Nonusablenameforthishouse");//.
SendClientMessage(playerid,-1,"Kuca napravljena");
HouseEnter[id] = CreateDynamicCP(x,y,z,1.5,GetPlayerVirtualWorld(playerid));//Pravljenje checkpointa i skladistenje u kucu
HouseExit[id] = CreateDynamicCP(443.9237,509.4609,1001.4195,1.5,GetPlayerVirtualWorld(playerid));//Pravljenje checkpointa za izlaz iz kuce i skadistenje.
new file[40],labelstring[100];//Pravljenje fajla i etiketu stringa
format(file,sizeof(file),"FHouse/Houses/%i.ini",id);//Formatiranje odabrane kuce
INI_Open(file);//Otvaranje fajla preko SII.
INI_WriteInt("Price",HousePrice);//Pisanje informacija cena,lvl ostalo
INI_WriteInt("Owned",0);//Podesavanje vlasnista owner - 0
INI_WriteInt("VirtualWorld",GetPlayerVirtualWorld( playerid));//Pisanje u vitual svetu
INI_WriteFloat("XPos",x);//Odnos pozicije igraca na odnos checkpointa
INI_WriteFloat("YPos",y);//Automatski
INI_WriteFloat("ZPos",z);//Automatski
INI_WriteString("Owner","Nonusablenameforthishouse");
INI_Close();//Zatvaranje SII.
format(labelstring,sizeof(labelstring),"Vlasnik: Nema \nPrice: %i",HousePrice);
HInfo[id][HouseLabel] = Create3DTextLabel(labelstring,0xFF0000FF,x,y,z,25. 0,GetPlayerVirtualWorld(playerid));
HouseCount++;
return 1;
}
errors
Код:
C:\Users\PC\Desktop\Dejanovi folderi\Black Angeles RolePlay\gamemodes\BlackAngeles.pwn(451) : error 035: argument type mismatch (argument 1)
C:\Users\PC\Desktop\Dejanovi folderi\Black Angeles RolePlay\gamemodes\BlackAngeles.pwn(452) : error 035: argument type mismatch (argument 1)
C:\Users\PC\Desktop\Dejanovi folderi\Black Angeles RolePlay\gamemodes\BlackAngeles.pwn(453) : error 035: argument type mismatch (argument 1)
C:\Users\PC\Desktop\Dejanovi folderi\Black Angeles RolePlay\gamemodes\BlackAngeles.pwn(454) : error 035: argument type mismatch (argument 1)
C:\Users\PC\Desktop\Dejanovi folderi\Black Angeles RolePlay\gamemodes\BlackAngeles.pwn(455) : error 035: argument type mismatch (argument 1)
C:\Users\PC\Desktop\Dejanovi folderi\Black Angeles RolePlay\gamemodes\BlackAngeles.pwn(456) : error 035: argument type mismatch (argument 1)
C:\Users\PC\Desktop\Dejanovi folderi\Black Angeles RolePlay\gamemodes\BlackAngeles.pwn(457) : error 035: argument type mismatch (argument 1)
C:\Users\PC\Desktop\Dejanovi folderi\Black Angeles RolePlay\gamemodes\BlackAngeles.pwn(458) : warning 202: number of arguments does not match definition
C:\Users\PC\Desktop\Dejanovi folderi\Black Angeles RolePlay\gamemodes\BlackAngeles.pwn(460) : error 001: expected token: ",", but found "."
C:\Users\PC\Desktop\Dejanovi folderi\Black Angeles RolePlay\gamemodes\BlackAngeles.pwn(460) : error 029: invalid expression, assumed zero
C:\Users\PC\Desktop\Dejanovi folderi\Black Angeles RolePlay\gamemodes\BlackAngeles.pwn(460) : warning 215: expression has no effect
C:\Users\PC\Desktop\Dejanovi folderi\Black Angeles RolePlay\gamemodes\BlackAngeles.pwn(460) : error 001: expected token: ";", but found ")"
C:\Users\PC\Desktop\Dejanovi folderi\Black Angeles RolePlay\gamemodes\BlackAngeles.pwn(460) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


11 Errors.
Reply
#2

Show lines
Reply
#3

i show you command who making error
Reply
#4

We need Lines with numbers
Reply
#5

can you explain better
Reply
#6

We need codes lines..

PHP код:
C:\Users\PC\Desktop\Dejanovi folderi\Black Angeles RolePlay\gamemodes\BlackAngeles.pwn(451) : error 035argument type mismatch (argument 1)
C:\Users\PC\Desktop\Dejanovi folderi\Black Angeles RolePlay\gamemodes\BlackAngeles.pwn(452) : error 035argument type mismatch (argument 1)
C:\Users\PC\Desktop\Dejanovi folderi\Black Angeles RolePlay\gamemodes\BlackAngeles.pwn(453) : error 035argument type mismatch (argument 1)
C:\Users\PC\Desktop\Dejanovi folderi\Black Angeles RolePlay\gamemodes\BlackAngeles.pwn(454) : error 035argument type mismatch (argument 1)
C:\Users\PC\Desktop\Dejanovi folderi\Black Angeles RolePlay\gamemodes\BlackAngeles.pwn(455) : error 035argument type mismatch (argument 1)
C:\Users\PC\Desktop\Dejanovi folderi\Black Angeles RolePlay\gamemodes\BlackAngeles.pwn(456) : error 035argument type mismatch (argument 1)
C:\Users\PC\Desktop\Dejanovi folderi\Black Angeles RolePlay\gamemodes\BlackAngeles.pwn(457) : error 035argument type mismatch (argument 1)
C:\Users\PC\Desktop\Dejanovi folderi\Black Angeles RolePlay\gamemodes\BlackAngeles.pwn(458) : warning 202number of arguments does not match definition
C
:\Users\PC\Desktop\Dejanovi folderi\Black Angeles RolePlay\gamemodes\BlackAngeles.pwn(460) : error 001expected token","but found "."
C:\Users\PC\Desktop\Dejanovi folderi\Black Angeles RolePlay\gamemodes\BlackAngeles.pwn(460) : error 029invalid expressionassumed zero
C
:\Users\PC\Desktop\Dejanovi folderi\Black Angeles RolePlay\gamemodes\BlackAngeles.pwn(460) : warning 215expression has no effect
C
:\Users\PC\Desktop\Dejanovi folderi\Black Angeles RolePlay\gamemodes\BlackAngeles.pwn(460) : error 001expected token";"but found ")"
C:\Users\PC\Desktop\Dejanovi folderi\Black Angeles RolePlay\gamemodes\BlackAngeles.pwn(460) : fatal error 107too many error messages on one line 
Haven't you see (460) Or (459) (45 (457) Lines?
Please mark lines of the codes..
Reply
#7

here codes
Код:
INI_WriteInt("Price",HousePrice);//Pisanje informacija cena,lvl ostalo
INI_WriteInt("Owned",0);//Podesavanje vlasnista owner - 0
INI_WriteInt("VirtualWorld",GetPlayerVirtualWorld( playerid));//Pisanje u vitual svetu
INI_WriteFloat("XPos",x);//Odnos pozicije igraca na odnos checkpointa
INI_WriteFloat("YPos",y);//Automatski
INI_WriteFloat("ZPos",z);//Automatski
INI_WriteString("Owner","Nonusablenameforthishouse");
INI_Close();//Zatvaranje SII.
format(labelstring,sizeof(labelstring),"Vlasnik: Nema \nPrice: %i",HousePrice);
HInfo[id][HouseLabel] = Create3DTextLabel(labelstring,0xFF0000FF,x,y,z,25. 0,GetPlayerVirtualWorld(playerid));
HouseCount++;
return 1;
}
Reply
#8

PHP код:
new INI:File INI_Open(file);
INI_WriteInt(File,"Price",HousePrice);//Pisanje informacija cena,lvl ostalo
INI_WriteInt(File,"Owned",0);//Podesavanje vlasnista owner - 0
INI_WriteInt(File,"VirtualWorld",GetPlayerVirtualWorldplayerid));//Pisanje u vitual svetu
INI_WriteFloat(File,"XPos",x);//Odnos pozicije igraca na odnos checkpointa
INI_WriteFloat(File,"YPos",y);//Automatski
INI_WriteFloat(File,"ZPos",z);//Automatski
INI_WriteString(File,"Owner","Nonusablenameforthishouse");
INI_Close();//Zatvaranje SII.
format(labelstring,sizeof(labelstring),"Vlasnik: Nema \nPrice: %i",HousePrice);
HInfo[id][HouseLabel] = Create3DTextLabel(labelstring,0xFF0000FF,x,y,z,25. 0,GetPlayerVirtualWorld(playerid));
HouseCount++;
return 
1;

Reply
#9

dont work
Reply
#10

You didn't set the Opened File to a variable

Try now:

PHP код:
    new file[40],labelstring[100];//Pravljenje fajla i etiketu stringa
    
format(file,sizeof(file),"FHouse/Houses/%i.ini",id);//Formatiranje odabrane kuce
    
new INI:File INI_Open(file); // <------
    
INI_WriteInt(File"Price"HousePrice);//Pisanje informacija cena,lvl ostalo
    
INI_WriteInt(File"Owned"0);//Podesavanje vlasnista owner - 0
    
INI_WriteInt(File"VirtualWorld",GetPlayerVirtualWorld(playerid));//Pisanje u vitual svetu
    
INI_WriteFloat(File"XPos"x);//Odnos pozicije igraca na odnos checkpointa
    
INI_WriteFloat(File"YPos"y);//Automatski
    
INI_WriteFloat(File"ZPos"z);//Automatski
    
INI_WriteString(File"Owner""Nonusablenameforthishouse");
    
INI_Close(File);//Zatvaranje SII. 
Reply
#11

tnx bro
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)