UpiR 0 Odesláno: 3. Duben, 2013 Share Odesláno: 3. Duben, 2013 public CrateHouse() { if(pocet < 10) { new s2[100]; format(s2,100,"houses/house%d.txt",pocet); dini_Create(s2); dini_IntSet(s2,"Predaj",1); dini_IntSet(s2,"Money",0); dini_IntSet(s2,"Marihuana",0); CrateHouse(); pocet ++; } return 1; } Ako vidite snažil som sa urobiť ciklus ktory vitvory 10house suborov neviem prečo ale vitvori sa mi iba house1.. neviete čim to môže byť ? a existuje cod na zatvorenie suboru ? (dini) Link to comment Share on other sites More sharing options...
0 wroxx 37 Odesláno: 3. Duben, 2013 Share Odesláno: 3. Duben, 2013 public CrateHouse() { while (pocet < 10) { new s2[100]; format(s2,100,"houses/house%d.txt",pocet); dini_Create(s2); dini_IntSet(s2,"Predaj",1); dini_IntSet(s2,"Money",0); dini_IntSet(s2,"Marihuana",0); pocet ++; } return 1; } Link to comment Share on other sites More sharing options...
0 UpiR 0 Odesláno: 3. Duben, 2013 Author Share Odesláno: 3. Duben, 2013 Wow diky môžem sa spytať o vysvetlenie codu "while" ? aby som vedel jeho viužtia ? plls Link to comment Share on other sites More sharing options...
0 wroxx 37 Odesláno: 3. Duben, 2013 Share Odesláno: 3. Duben, 2013 while (xxx < 10) { xxx ++; } V preklade "ak xxx bude menší ako 10 pripočítaj k xxx + 1 (xxx ++)" a toto sa bude opakovať až kám xxx nebude 10, potom automaticky prestane. Snád' si pochopil Link to comment Share on other sites More sharing options...
0 UpiR 0 Odesláno: 3. Duben, 2013 Author Share Odesláno: 3. Duben, 2013 neviem ale ja som to pochopil tak že bude sa to opakovať do vtedy až kym podmienka nebude platiť.. aj takto sa to da pochopiť nie ? Link to comment Share on other sites More sharing options...
0 wroxx 37 Odesláno: 3. Duben, 2013 Share Odesláno: 3. Duben, 2013 presne tak. Link to comment Share on other sites More sharing options...
0 UpiR 0 Odesláno: 3. Duben, 2013 Author Share Odesláno: 3. Duben, 2013 Okay Diky moc Link to comment Share on other sites More sharing options...
Dotaz
UpiR 0
Ako vidite snažil som sa urobiť ciklus ktory vitvory 10house suborov
neviem prečo ale vitvori sa mi iba house1.. neviete čim to môže byť ?
a existuje cod na zatvorenie suboru ? (dini)
Link to comment
Share on other sites
6 odpovědí na tuto otázku
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now