warum 'Dublicate Variable Name'?
Übersicht

CO2ehemals "SirMO"Betreff: warum 'Dublicate Variable Name'? |
![]() Antworten mit Zitat ![]() |
|
---|---|---|
Code: [AUSKLAPPEN] ;graphics
Graphics3D 1024, 768, 32, 1 ;##################### ;stuff AppTitle "" CreateDir("USERDATA") ;##################### ;variablen ;Gamedata Global FPS% = CreateTimer(60) ;Frames Per Second Global game% = 1 Global ingame% = 0 Global menu% = 1 Global pmenu% = 0 Global money# = 12000.00 Global save% = 0 Global statsave% = 0 ;### ;Spielerdata Global tagdatum% = 1 Global monatdatum% = 1 Global jahrdatum% = 2010 Global stunden% = 6 Global m# = 0 Global money# = 12000.0 Global moneyprint$ = Round$(money#, 2) Global points% = 0 ;Punkte des Spielers Global rang% = 0 ;Rang des Spielers (bis 6 (info: siehe worklog)) ;### ;###################### ;funktionen Function Round$(Zahl#, Stellen%) Local T$ = Str(Zahl#) T$ = Left(T$,Instr(T$,".") + Stellen%) If Mid(T$,Instr(T$,".") + 1, Stellen%) < Stellen% While Len(Mid(T$,Instr(T$,".") + 1, Stellen%)) < Stellen% T$ = T$ + "0" Wend EndIf Return T$ End Function ;##################### ;hauptprogramm SetBuffer BackBuffer() Repeat WaitTimer(FPS) Cls ;Datumberechnung etc. m# = m# + 0.05 Local minuten% = Int(m#) If(m# >= 59) Then stunden% = stunden% + 1 m# = 0 EndIf If(stunden% >= 24) Then tagdatum% = tagdatum% + 1 stunden% = 0 EndIf If(tagdatum% >= 30) Then monatdatum% = monatdatum% + 1 tagdatum% = 1 EndIf If(monatdatum% >= 12) Then jahrdatum% = jahrdatum% + 1 monatdatum = 1 EndIf If(minuten% < 10)Then Text 400, 20, "" + stunden% + ":0" + minuten% + " " + tagdatum% + "." + monatdatum% + "." + jahrdatum% + "" Else Text 400, 20, "" + stunden% + ":" + minuten% + " " + tagdatum% + "." + monatdatum% + "." + jahrdatum% + "" EndIf ;### ;userstatsberechnung ;geld Text 700, 20, "" + moneyprint + "Euro" ;### If(save% = 1) Then ;Hier kommt das speichern rein! save = 0 EndIf If(statsave% = 1) Then ;Hier kommt das Statistikspeichern rein! statsave% = 0 EndIf If((KeyHit(1)) And (ingame% = 1)) Then pmenu% = 1 EndIf If(pmenu% = 1) Then ;Hier kommt alles für das Pausenmenü rein! pmenu% = 0 EndIf Flip FlushMouse FlushKeys Until game = 0 End ;##################### (genau so hat der Code gestern funktioniert ![]() |
||
mfG, CO²
Sprachen: BlitzMax, C, C++, C#, Java Hardware: Windows 7 Ultimate 64-Bit, AMX FX-6350 (6x3,9 GHz), 32 GB RAM, Nvidia GeForce GTX 750 Ti |
![]() |
Goodjee |
![]() Antworten mit Zitat ![]() |
---|---|---|
weil du global money zweimal definierst | ||
"Ideen sind keine Coladosen, man kann sie nicht recyclen"-Dr. House
http://deeebian.redio.de/ http://goodjee.redio.de/ |
![]() |
Blackside |
![]() Antworten mit Zitat ![]() |
---|---|---|
Du benutzt zwei mal den Variablenname: "money" und deklarierst es beides mal als Global....
Edit: Da war wieder jemand schneller^^ |
||
Hier sollte eigentlich eine Signatur stehen! |
CO2ehemals "SirMO" |
![]() Antworten mit Zitat ![]() |
|
---|---|---|
ok thx ![]() ![]() |
||
mfG, CO²
Sprachen: BlitzMax, C, C++, C#, Java Hardware: Windows 7 Ultimate 64-Bit, AMX FX-6350 (6x3,9 GHz), 32 GB RAM, Nvidia GeForce GTX 750 Ti |
![]() |
Pummelie |
![]() Antworten mit Zitat ![]() |
---|---|---|
Das wirklich eigenartige daran ist, das der Code so gestern funktioniert haben soll...
Du hättest den fehler aber an der als Fehler makierten Zeile ablesen könne (oder nicht ![]() |
||
It's done when it's done. |
![]() |
Goodjee |
![]() Antworten mit Zitat ![]() |
---|---|---|
ich nehme an er hat ausversehn markiert und die maus verrissen und dann war das halt 2mal da | ||
"Ideen sind keine Coladosen, man kann sie nicht recyclen"-Dr. House
http://deeebian.redio.de/ http://goodjee.redio.de/ |
CO2ehemals "SirMO" |
![]() Antworten mit Zitat ![]() |
|
---|---|---|
ich hab wahrscheinlich anstatt "strg + x" "strg + c" gedrückt ![]() |
||
mfG, CO²
Sprachen: BlitzMax, C, C++, C#, Java Hardware: Windows 7 Ultimate 64-Bit, AMX FX-6350 (6x3,9 GHz), 32 GB RAM, Nvidia GeForce GTX 750 Ti |
Übersicht


Powered by phpBB © 2001 - 2006, phpBB Group