Cloudsx Posted February 22, 2006 Author Share Posted February 22, 2006 so you meen this #include <GUIConstants.au3> $cash = iniread("rechours", "Ressources", "Cash", 0) msgbox(0, "", "Your Cash is: " & $cash) GUICreate("game",350,400); will create a dialog box that when displayed is centered GUISetState (@SW_SHOW); will display an empty dialog GUICtrlCreatePic("Cash.jpg",25,10,20,20) $Label = GuiCtrlCreateLabel($cash,50,15) GUICtrlCreatePic("iron.jpg",115,10,20,20) GUICtrlCreatePic("ederuim.jpg",200,10,20,20) GUICtrlCreatePic("electricity.jpg",275,10,20,20) Link to comment Share on other sites More sharing options...
Cloudsx Posted February 22, 2006 Author Share Posted February 22, 2006 (edited) can the script read this rechours.ini i can put in ini because i dont accept Edited February 22, 2006 by Cloudsx Link to comment Share on other sites More sharing options...
Valuater Posted February 22, 2006 Share Posted February 22, 2006 #include <GUIConstants.au3> IniWrite("rechours.ini", "Resources", "Cash", 0) that will write an ini for you.. just add the others like you want 8) Link to comment Share on other sites More sharing options...
Cloudsx Posted February 22, 2006 Author Share Posted February 22, 2006 now i have this code #include <GUIConstants.au3> IniWrite("rechours.ini", "Resources", "Cash", 2500) IniWrite("rechours.ini", "recources", "Iron", 500) IniWrite("rechours.ini", "recources", "ederuim", 0) IniWrite("rechours.ini", "recources", "electricity", 0) $Cash = iniread("rechours", "rechours", "Cash",0) msgbox(0, "", "Your Cash is: " & $Cash) GUICreate("game",350,400); will create a dialog box that when displayed is centered GUISetState (@SW_SHOW); will display an empty dialog GUICtrlCreatePic("Cash.jpg",25,10,20,20) $Label = GuiCtrlCreateLabel($Cash,50,15) GUICtrlCreatePic("iron.jpg",115,10,20,20) GUICtrlCreatePic("ederuim.jpg",200,10,20,20) GUICtrlCreatePic("electricity.jpg",275,10,20,20) but i have use the label and it must show what i made in the ini cash 2500 but it show 0 Link to comment Share on other sites More sharing options...
Valuater Posted February 22, 2006 Share Posted February 22, 2006 you have $Cash = iniread("rechours" change it to $Cash = iniread("rechours.ini" 8) Link to comment Share on other sites More sharing options...
Cloudsx Posted February 23, 2006 Author Share Posted February 23, 2006 (edited) i have $cash = iniread("rechours.ini" but still he say it is 0 but i did somehting els and that will hopefully work but now how can i change th cash if a sniper is buyed from 200 cash and 5 iron how can i let it say 2300 cash and 495 iron Edited February 23, 2006 by Cloudsx Link to comment Share on other sites More sharing options...
BigDod Posted February 23, 2006 Share Posted February 23, 2006 (edited) i have $cash = iniread("rechours.ini" but still he say it is 0Change $Cash = iniread("rechours", "rechours", "Cash",0) to $Cash = iniread("rechours.ini", "Resources", "Cash",0) You may also want to check your iniwrite lines for typos. Edited February 23, 2006 by BigDod Time you enjoyed wasting is not wasted time ......T.S. Elliot Suspense is worse than disappointment................Robert Burns God help the man who won't help himself, because no-one else will...........My Grandmother Link to comment Share on other sites More sharing options...
Cloudsx Posted February 23, 2006 Author Share Posted February 23, 2006 thanks it work now it says 2500 cash and 500 iron but now how can i change th cash if a sniper is buyed from 200 cash and 5 iron how can i let it say 2300 cash and 495 iron Link to comment Share on other sites More sharing options...
BigDod Posted February 23, 2006 Share Posted February 23, 2006 thanks it work now it says 2500 cash and 500 iron but now how can i change th cash if a sniper is buyed from 200 cash and 5 iron how can i let it say 2300 cash and 495 ironI am not sure where to put it but here is a clue IniWrite("rechours.ini", "Resources", "Cash", $cash-500) Time you enjoyed wasting is not wasted time ......T.S. Elliot Suspense is worse than disappointment................Robert Burns God help the man who won't help himself, because no-one else will...........My Grandmother Link to comment Share on other sites More sharing options...
Cloudsx Posted February 23, 2006 Author Share Posted February 23, 2006 I am not sure where to put it but here is a clue IniWrite("rechours.ini", "Resources", "Cash", $cash-500) i will try Link to comment Share on other sites More sharing options...
Cloudsx Posted February 23, 2006 Author Share Posted February 23, 2006 now i have this Func GUI2Create() If WinExists("gebouwen") then Return $2 = GUICreate("gebouwen",350,400) GUICtrlCreateButton("Cash Fabriek",25,75,75,25) GUICtrlCreateLabel("benodigheden:",25,25,75,25) GUICtrlCreateLabel("Cash:1000 Iron:100",25,50,75,25) GUISetState (@SW_SHOW) EndFunc but i want if the button is press then that the cash and iron go off and it must going to be build so how can i show that Link to comment Share on other sites More sharing options...
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