what does this mean
Blitz3D Forums/Blitz3D Beginners Area/what does this mean
| ||
I'm trying to edit something in an Mdickie game and i get function 'getpercent' not found when i try to run the program. Any idea how this is fixable? |
| ||
Use grep or similar text search tool to figure out where the function is. If it exists, include/import the file otherwise create a dummy function matching the prototype. But since its name is "getpercent" i assume it does what it says, so shouldnt be too hard to implement it proper. |
| ||
how would i do that? btw can someone move this? I'm using blitz3D not blitz max |
| ||
Since its Blitz3D i assume your on windows in which case using the search field in explorer should be sufficient. EDIT: As for the function, i cant say without more information (like the line its called from) |
| ||
here you go grable. [url]https://www.mediafire.com/?4ljduizr91a59h6[/url] |
| ||
Ok, stick this somewhere in that file.Function GetPercent#( value#, maxvalue#) Return (value / maxvalue) * 100.0 End FunctionIf you get weird values, reorder the arguments. I dont have Blitz3D so wont be able to test it. EDIT: Divided in the wrong order |
| ||
You may also want to implement PercentOf() while you're at it :-) |
| ||
function ge not found. |
| ||
Have you done much programming before? It's just that it is generally quite hard to fill in missing functionality for a program one knows nothing about. You can make educated guesses, but it is likely prone to failure at some point :-) |
| ||
Yeah, i cant go any further really. Not having b3d stops me in my tracks ;) And that Hardware.bb isnt the only file either, as it contains only data and functions to work with that data. But i suspect your package is incomplete, if several files are missing functions. |
| ||
None actually. Can you help me out via some sort of messenger brucey? EDIT: What does expecting end of file mean and how do i fix it |
| ||
;////////////////////////////////////////////////////////////////////////////// ;------------------------ UNDER DEVELOPMENT: HARDWARE DATA -------------------- ;////////////////////////////////////////////////////////////////////////////// ;/////////////////////////////////////////////////////// ;--------------------- FORMATS ------------------------- ;/////////////////////////////////////////////////////// .Formats Dim formatName$(5) Dim formatCost(5) formatName$(0)="Digital" : formatCost(0)=0 formatName$(1)="Compact Disc" : formatCost(1)=5 formatName$(2)="Floppy Disc" : formatCost(2)=5 formatName$(3)="Cassette" : formatCost(3)=5 formatName$(4)="Media Disc" : formatCost(4)=10 formatName$(5)="Cartridge" : formatCost(5)=10 ;CALCULATE PERCENTAGE OF VALUE Function PercentOf#(valueA#,percent#) valueB#=(valueA#/100)*percent# Return valueB# End Function ;CALCULATE VALUE AS PERCENT Function GetPercent#(valueA#,valueB#) percent#=0 If valueB#>0 Then percent#=(valueA#/valueB#)*100 Return percent# End Function ;/////////////////////////////////////////////////////// ;--------------------- HARDWARE ------------------------ ;/////////////////////////////////////////////////////// .Hardware no_machines=38 hardFoc,hardScroll Dim hardList(100) Dim hardListed(100) Dim hardBrand$(100) Dim hardTitle$(100) Dim hardModel$(100) ;name of 3D model Dim hardCom$(100) ;name of computer used for development Dim hardTV$(100) ;name of preferred monitor Dim hardFormat(100) ;0=Online, 1=CD, 2=Floppy, 3=Tape, 4=UMD, 5=Cartridge Dim hardHandheld(100) ;1=vertical (gameboy), 2=horizontal (PSP), 3=book (DS) Dim hardCost(100) Dim hardRetail(100) Dim hardOwned(100) Dim hardWeek(100),hardMonth(100),hardYear(100) Dim hardReleased(100) Dim hardOldPromotion#(100) Dim hardPromotion#(100) Dim hardUsers(100) Dim hardPeakUsers(100) Dim hardPirated(100) Dim hardGameplay(100) Dim hardReplay(100) Dim hard2D(100) Dim hard3D(100) Dim hardSound(100) Dim hardMusic(100) Dim hardOldGameplay(100) Dim hardOldReplay(100) Dim hardOld2D(100) Dim hardOld3D(100) Dim hardOldSound(100) Dim hardOldMusic(100) Dim hardNewGameplay(100) Dim hardNewReplay(100) Dim hardNew2D(100) Dim hardNew3D(100) Dim hardNewSound(100) Dim hardNewMusic(100) Dim hardStandard(7),hardLeader(7) ;industry standard in each category Global hardOldLeader=1 ;default data n=1 : hardBrand$(n)="Atari" : hardTitle$(n)="Atari 2600" hardModel$(n)="Atari" : hardCom$(n)="Keyboard" : hardTV$(n)="OldTV" hardWeek(n)=1 : hardMonth(n)=1 : hardYear(n)=1981 hardCost(n)=0 : hardRetail(n)=20 : hardFormat(n)=5 : hardHandheld(n)=0 hardGameplay(n)=40 : hardReplay(n)=40 hard2D(n)=40 : hard3D(n)=25 hardSound(n)=40 : hardMusic(n)=40 ;first computers n=2 : hardBrand$(n)="Sinclair" : hardTitle$(n)="ZX Spectrum" hardModel$(n)="Spectrum" : hardCom$(n)="Spectrum" : hardTV$(n)="OldTV" hardWeek(n)=3 : hardMonth(n)=2 : hardYear(n)=1982 hardCost(n)=25000 : hardRetail(n)=10 : hardFormat(n)=3 : hardHandheld(n)=0 hardGameplay(n)=45 : hardReplay(n)=50 hard2D(n)=45 : hard3D(n)=30 hardSound(n)=45 : hardMusic(n)=45 n=3 : hardBrand$(n)="Commodore" : hardTitle$(n)="Commodore 64" hardModel$(n)="C64" : hardCom$(n)="C64" : hardTV$(n)="Monitor" hardWeek(n)=2 : hardMonth(n)=3 : hardYear(n)=1983 hardCost(n)=50000 : hardRetail(n)=10 : hardFormat(n)=3 : hardHandheld(n)=0 hardGameplay(n)=50 : hardReplay(n)=55 hard2D(n)=55 : hard3D(n)=40 hardSound(n)=50 : hardMusic(n)=50 n=4 : hardBrand$(n)="Amstrad" : hardTitle$(n)="Amstrad CPC" hardModel$(n)="Amstrad" : hardCom$(n)="Amstrad" : hardTV$(n)="BoxTV" hardWeek(n)=4 : hardMonth(n)=1 : hardYear(n)=1984 hardCost(n)=25000 : hardRetail(n)=10 : hardFormat(n)=3 : hardHandheld(n)=0 hardGameplay(n)=50 : hardReplay(n)=55 hard2D(n)=50 : hard3D(n)=35 hardSound(n)=50 : hardMusic(n)=50 ;8-bit era n=5 : hardBrand$(n)="Nintendo" : hardTitle$(n)="NES" hardModel$(n)="NES" : hardCom$(n)="Keyboard" : hardTV$(n)="OldTV" hardWeek(n)=1 : hardMonth(n)=4 : hardYear(n)=1986 hardCost(n)=75000 : hardRetail(n)=20 : hardFormat(n)=5 : hardHandheld(n)=0 hardGameplay(n)=60 : hardReplay(n)=60 hard2D(n)=55 : hard3D(n)=35 hardSound(n)=60 : hardMusic(n)=60 n=6 : hardBrand$(n)="Sega" : hardTitle$(n)="Master System" hardModel$(n)="Master" : hardCom$(n)="Keyboard" : hardTV$(n)="OldTV" hardWeek(n)=2 : hardMonth(n)=6 : hardYear(n)=1986 hardCost(n)=50000 : hardRetail(n)=20 : hardFormat(n)=5 : hardHandheld(n)=0 hardGameplay(n)=55 : hardReplay(n)=55 hard2D(n)=60 : hard3D(n)=40 hardSound(n)=60 : hardMusic(n)=60 ;early handhelds n=7 : hardBrand$(n)="Nintendo" : hardTitle$(n)="Gameboy" hardModel$(n)="Gameboy" : hardCom$(n)="Keyboard" : hardTV$(n)="OldTV" hardWeek(n)=1 : hardMonth(n)=5 : hardYear(n)=1989 hardCost(n)=50000 : hardRetail(n)=20 : hardFormat(n)=5 : hardHandheld(n)=1 hardGameplay(n)=55 : hardReplay(n)=55 hard2D(n)=45 : hard3D(n)=30 hardSound(n)=55 : hardMusic(n)=55 n=8 : hardBrand$(n)="Sega" : hardTitle$(n)="Game Gear" hardModel$(n)="Gear" : hardCom$(n)="Keyboard" : hardTV$(n)="OldTV" hardWeek(n)=2 : hardMonth(n)=3 : hardYear(n)=1990 hardCost(n)=75000 : hardRetail(n)=20 : hardFormat(n)=5 : hardHandheld(n)=2 hardGameplay(n)=55 : hardReplay(n)=50 hard2D(n)=60 : hard3D(n)=35 hardSound(n)=50 : hardMusic(n)=50 n=9 : hardBrand$(n)="Atari" : hardTitle$(n)="Lynx" hardModel$(n)="Lynx" : hardCom$(n)="AtariST" : hardTV$(n)="OldTV" hardWeek(n)=3 : hardMonth(n)=5 : hardYear(n)=1990 hardCost(n)=75000 : hardRetail(n)=20 : hardFormat(n)=5 : hardHandheld(n)=2 hardGameplay(n)=50 : hardReplay(n)=55 hard2D(n)=55 : hard3D(n)=40 hardSound(n)=55 : hardMusic(n)=55 ;16-bit computers n=10 : hardBrand$(n)="Atari" : hardTitle$(n)="Atari ST" hardModel$(n)="AtariST" : hardCom$(n)="AtariST" : hardTV$(n)="Monitor" hardWeek(n)=4 : hardMonth(n)=1 : hardYear(n)=1987 hardCost(n)=150000 : hardRetail(n)=10 : hardFormat(n)=2 : hardHandheld(n)=0 hardGameplay(n)=60 : hardReplay(n)=70 hard2D(n)=65 : hard3D(n)=60 hardSound(n)=65 : hardMusic(n)=65 n=11 : hardBrand$(n)="Commodore" : hardTitle$(n)="Amiga 500" hardModel$(n)="Amiga" : hardCom$(n)="Amiga" : hardTV$(n)="Monitor" hardWeek(n)=3 : hardMonth(n)=7 : hardYear(n)=1987 hardCost(n)=150000 : hardRetail(n)=10 : hardFormat(n)=2 : hardHandheld(n)=0 hardGameplay(n)=65 : hardReplay(n)=75 hard2D(n)=70 : hard3D(n)=55 hardSound(n)=70 : hardMusic(n)=70 ;16-bit era n=12 : hardBrand$(n)="Sega" : hardTitle$(n)="Megadrive" hardModel$(n)="Mega" : hardCom$(n)="Keyboard" : hardTV$(n)="BoxTV" hardWeek(n)=1 : hardMonth(n)=1 : hardYear(n)=1990 hardCost(n)=75000 : hardRetail(n)=20 : hardFormat(n)=5 : hardHandheld(n)=0 hardGameplay(n)=65 : hardReplay(n)=65 hard2D(n)=65 : hard3D(n)=45 hardSound(n)=65 : hardMusic(n)=65 n=13 : hardBrand$(n)="Nintendo" : hardTitle$(n)="Super Nintendo" hardModel$(n)="SNES" : hardCom$(n)="Keyboard" : hardTV$(n)="BoxTV" hardWeek(n)=3 : hardMonth(n)=3 : hardYear(n)=1991 hardCost(n)=100000 : hardRetail(n)=20 : hardFormat(n)=5 : hardHandheld(n)=0 hardGameplay(n)=70 : hardReplay(n)=70 hard2D(n)=70 : hard3D(n)=50 hardSound(n)=70 : hardMusic(n)=70 n=37 : hardBrand$(n)="SNK" : hardTitle$(n)="Neo Geo" hardModel$(n)="NeoGeo" : hardCom$(n)="Keyboard" : hardTV$(n)="BoxTV" hardWeek(n)=1 : hardMonth(n)=10 : hardYear(n)=1990 hardCost(n)=125000 : hardRetail(n)=20 : hardFormat(n)=5 : hardHandheld(n)=0 hardGameplay(n)=70 : hardReplay(n)=65 hard2D(n)=75 : hard3D(n)=55 hardSound(n)=75 : hardMusic(n)=75 n=38 : hardBrand$(n)="Commodore" : hardTitle$(n)="Amiga CD32" hardModel$(n)="CD32" : hardCom$(n)="Amiga" : hardTV$(n)="BoxTV" hardWeek(n)=4 : hardMonth(n)=9 : hardYear(n)=1993 hardCost(n)=75000 : hardRetail(n)=10 : hardFormat(n)=1 : hardHandheld(n)=0 hardGameplay(n)=70 : hardReplay(n)=70 hard2D(n)=70 : hard3D(n)=55 hardSound(n)=75 : hardMusic(n)=75 ;32/64-bit era n=14 : hardBrand$(n)="Atari" : hardTitle$(n)="Jaguar" hardModel$(n)="Jaguar" : hardCom$(n)="AtariST" : hardTV$(n)="BoxTV" hardWeek(n)=1 : hardMonth(n)=8 : hardYear(n)=1993 hardCost(n)=150000 : hardRetail(n)=20 : hardFormat(n)=5 : hardHandheld(n)=0 hardGameplay(n)=70 : hardReplay(n)=70 hard2D(n)=75 : hard3D(n)=65 hardSound(n)=75 : hardMusic(n)=75 n=15 : hardBrand$(n)="Sega" : hardTitle$(n)="Saturn" hardModel$(n)="Saturn" : hardCom$(n)="Keyboard" : hardTV$(n)="BoxTV" hardWeek(n)=1 : hardMonth(n)=7 : hardYear(n)=1995 hardCost(n)=100000 : hardRetail(n)=15 : hardFormat(n)=1 : hardHandheld(n)=0 hardGameplay(n)=80 : hardReplay(n)=75 hard2D(n)=80 : hard3D(n)=70 hardSound(n)=80 : hardMusic(n)=80 n=16 : hardBrand$(n)="Sony" : hardTitle$(n)="Playstation" hardModel$(n)="PS1" : hardCom$(n)="Keyboard" : hardTV$(n)="BoxTV" hardWeek(n)=4 : hardMonth(n)=9 : hardYear(n)=1995 hardCost(n)=100000 : hardRetail(n)=15 : hardFormat(n)=1 : hardHandheld(n)=0 hardGameplay(n)=80 : hardReplay(n)=80 hard2D(n)=80 : hard3D(n)=70 hardSound(n)=80 : hardMusic(n)=80 n=17 : hardBrand$(n)="Nintendo" : hardTitle$(n)="Nintendo 64" hardModel$(n)="N64" : hardCom$(n)="Keyboard" : hardTV$(n)="BoxTV" hardWeek(n)=1 : hardMonth(n)=3 : hardYear(n)=1996 hardCost(n)=125000 : hardRetail(n)=20 : hardFormat(n)=5 : hardHandheld(n)=0 hardGameplay(n)=85 : hardReplay(n)=75 hard2D(n)=80 : hard3D(n)=70 hardSound(n)=75 : hardMusic(n)=75 ;windows (tracks industry standards) n=18 : hardBrand$(n)="Microsoft" : hardTitle$(n)="PC" hardModel$(n)="Keyboard" : hardCom$(n)="Keyboard" : hardTV$(n)="Monitor" hardWeek(n)=1 : hardMonth(n)=1 : hardYear(n)=1995 hardCost(n)=25000 : hardRetail(n)=10 : hardFormat(n)=1 : hardHandheld(n)=0 hardGameplay(n)=70 : hardReplay(n)=80 hard2D(n)=70 : hard3D(n)=60 hardSound(n)=75 : hardMusic(n)=75 ;128-bit era n=19 : hardBrand$(n)="Sega" : hardTitle$(n)="Dreamcast" hardModel$(n)="Dream" : hardCom$(n)="Keyboard" : hardTV$(n)="BigTV" hardWeek(n)=1 : hardMonth(n)=11 : hardYear(n)=1999 hardCost(n)=125000 : hardRetail(n)=15 : hardFormat(n)=1 : hardHandheld(n)=0 hardGameplay(n)=85 : hardReplay(n)=80 hard2D(n)=85 : hard3D(n)=75 hardSound(n)=85 : hardMusic(n)=85 n=20 : hardBrand$(n)="Sony" : hardTitle$(n)="Playstation 2" hardModel$(n)="PS2" : hardCom$(n)="Keyboard" : hardTV$(n)="BigTV" hardWeek(n)=1 : hardMonth(n)=10 : hardYear(n)=2000 hardCost(n)=125000 : hardRetail(n)=15 : hardFormat(n)=1 : hardHandheld(n)=0 hardGameplay(n)=85 : hardReplay(n)=85 hard2D(n)=90 : hard3D(n)=80 hardSound(n)=90 : hardMusic(n)=90 n=21 : hardBrand$(n)="Nintendo" : hardTitle$(n)="Gamecube" hardModel$(n)="Gamecube" : hardCom$(n)="Keyboard" : hardTV$(n)="BigTV" hardWeek(n)=1 : hardMonth(n)=8 : hardYear(n)=2001 hardCost(n)=150000 : hardRetail(n)=20 : hardFormat(n)=4 : hardHandheld(n)=0 hardGameplay(n)=90 : hardReplay(n)=80 hard2D(n)=90 : hard3D(n)=80 hardSound(n)=80 : hardMusic(n)=80 n=22 : hardBrand$(n)="Microsoft" : hardTitle$(n)="X-Box" hardModel$(n)="XBox" : hardCom$(n)="Keyboard" : hardTV$(n)="Monitor" hardWeek(n)=1 : hardMonth(n)=11 : hardYear(n)=2001 hardCost(n)=125000 : hardRetail(n)=15 : hardFormat(n)=1 : hardHandheld(n)=0 hardGameplay(n)=85 : hardReplay(n)=85 hard2D(n)=90 : hard3D(n)=80 hardSound(n)=90 : hardMusic(n)=90 ;modern handhelds n=23 : hardBrand$(n)="Nintendo" : hardTitle$(n)="Gameboy Advance" hardModel$(n)="Advance" : hardCom$(n)="Keyboard" : hardTV$(n)="Monitor" hardWeek(n)=4 : hardMonth(n)=3 : hardYear(n)=2001 hardCost(n)=100000 : hardRetail(n)=20 : hardFormat(n)=5 : hardHandheld(n)=2 hardGameplay(n)=70 : hardReplay(n)=70 hard2D(n)=70 : hard3D(n)=50 hardSound(n)=70 : hardMusic(n)=70 n=24 : hardBrand$(n)="Nintendo" : hardTitle$(n)="DS" hardModel$(n)="DS" : hardCom$(n)="Laptop" : hardTV$(n)="Laptop" hardWeek(n)=1 : hardMonth(n)=12 : hardYear(n)=2004 hardCost(n)=125000 : hardRetail(n)=20 : hardFormat(n)=5 : hardHandheld(n)=3 hardGameplay(n)=80 : hardReplay(n)=80 hard2D(n)=80 : hard3D(n)=60 hardSound(n)=75 : hardMusic(n)=75 n=25 : hardBrand$(n)="Sony" : hardTitle$(n)="PSP" hardModel$(n)="PSP" : hardCom$(n)="Laptop" : hardTV$(n)="Laptop" hardWeek(n)=2 : hardMonth(n)=3 : hardYear(n)=2005 hardCost(n)=100000 : hardRetail(n)=20 : hardFormat(n)=4 : hardHandheld(n)=2 hardGameplay(n)=80 : hardReplay(n)=80 hard2D(n)=80 : hard3D(n)=70 hardSound(n)=80 : hardMusic(n)=80 ;modern consoles n=26 : hardBrand$(n)="Microsoft" : hardTitle$(n)="X-Box 360" hardModel$(n)="XBox360" : hardCom$(n)="Laptop" : hardTV$(n)="BigTV" hardWeek(n)=1 : hardMonth(n)=2 : hardYear(n)=2006 hardCost(n)=150000 : hardRetail(n)=15 : hardFormat(n)=1 : hardHandheld(n)=0 hardGameplay(n)=90 : hardReplay(n)=90 hard2D(n)=95 : hard3D(n)=90 hardSound(n)=95 : hardMusic(n)=95 n=27 : hardBrand$(n)="Sony" : hardTitle$(n)="Playstation 3" hardModel$(n)="PS3" : hardCom$(n)="Laptop" : hardTV$(n)="BigTV" hardWeek(n)=1 : hardMonth(n)=11 : hardYear(n)=2006 hardCost(n)=150000 : hardRetail(n)=15 : hardFormat(n)=1 : hardHandheld(n)=0 hardGameplay(n)=90 : hardReplay(n)=90 hard2D(n)=95 : hard3D(n)=90 hardSound(n)=95 : hardMusic(n)=95 n=28 : hardBrand$(n)="Nintendo" : hardTitle$(n)="Wii" hardModel$(n)="Wii" : hardCom$(n)="Laptop" : hardTV$(n)="BigTV" hardWeek(n)=1 : hardMonth(n)=12 : hardYear(n)=2006 hardCost(n)=175000 : hardRetail(n)=15 : hardFormat(n)=1 : hardHandheld(n)=0 hardGameplay(n)=95 : hardReplay(n)=85 hard2D(n)=95 : hard3D(n)=80 hardSound(n)=95 : hardMusic(n)=95 ;apple n=36 : hardBrand$(n)="Apple" : hardTitle$(n)="Mac" hardModel$(n)="MacKeys" : hardCom$(n)="MacKeys" : hardTV$(n)="MacTV" hardWeek(n)=1 : hardMonth(n)=1 : hardYear(n)=1998 hardCost(n)=100000 : hardRetail(n)=10 : hardFormat(n)=1 : hardHandheld(n)=0 hardGameplay(n)=70 : hardReplay(n)=80 hard2D(n)=70 : hard3D(n)=60 hardSound(n)=80 : hardMusic(n)=80 n=29 : hardBrand$(n)="Apple" : hardTitle$(n)="iPhone" hardModel$(n)="iPhone" : hardCom$(n)="MacKeys" : hardTV$(n)="MacTV" hardWeek(n)=1 : hardMonth(n)=6 : hardYear(n)=2007 hardCost(n)=200000 : hardRetail(n)=5 : hardFormat(n)=0 : hardHandheld(n)=1 hardGameplay(n)=75 : hardReplay(n)=70 hard2D(n)=80 : hard3D(n)=60 hardSound(n)=99 : hardMusic(n)=99 n=30 : hardBrand$(n)="Apple" : hardTitle$(n)="iPad" hardModel$(n)="iPad" : hardCom$(n)="MacKeys" : hardTV$(n)="MacTV" hardWeek(n)=1 : hardMonth(n)=6 : hardYear(n)=2011 hardCost(n)=200000 : hardRetail(n)=5 : hardFormat(n)=0 : hardHandheld(n)=2 hardGameplay(n)=80 : hardReplay(n)=75 hard2D(n)=90 : hard3D(n)=80 hardSound(n)=99 : hardMusic(n)=99 ;next gen n=31 : hardBrand$(n)="Nintendo" : hardTitle$(n)="3DS" hardModel$(n)="DS" : hardCom$(n)="Laptop" : hardTV$(n)="Laptop" hardWeek(n)=4 : hardMonth(n)=3 : hardYear(n)=2011 hardCost(n)=150000 : hardRetail(n)=10 : hardFormat(n)=0 : hardHandheld(n)=3 hardGameplay(n)=90 : hardReplay(n)=90 hard2D(n)=90 : hard3D(n)=80 hardSound(n)=90 : hardMusic(n)=90 n=32 : hardBrand$(n)="Sony" : hardTitle$(n)="Vita" hardModel$(n)="Vita" : hardCom$(n)="Laptop" : hardTV$(n)="Laptop" hardWeek(n)=1 : hardMonth(n)=12 : hardYear(n)=2011 hardCost(n)=125000 : hardRetail(n)=10 : hardFormat(n)=0 : hardHandheld(n)=2 hardGameplay(n)=90 : hardReplay(n)=90 hard2D(n)=90 : hard3D(n)=80 hardSound(n)=90 : hardMusic(n)=90 n=33 : hardBrand$(n)="Nintendo" : hardTitle$(n)="Wii U" hardModel$(n)="WiiU" : hardCom$(n)="Laptop" : hardTV$(n)="BigTV" hardWeek(n)=1 : hardMonth(n)=4 : hardYear(n)=2012 hardCost(n)=175000 : hardRetail(n)=10 : hardFormat(n)=0 : hardHandheld(n)=2 hardGameplay(n)=99 : hardReplay(n)=99 hard2D(n)=99 : hard3D(n)=90 hardSound(n)=99 : hardMusic(n)=99 n=34 : hardBrand$(n)="Sony" : hardTitle$(n)="Playstation 4" hardModel$(n)="PS3" : hardCom$(n)="Laptop" : hardTV$(n)="BigTV" hardWeek(n)=1 : hardMonth(n)=1 : hardYear(n)=2013 hardCost(n)=200000 : hardRetail(n)=10 : hardFormat(n)=0 : hardHandheld(n)=0 hardGameplay(n)=99 : hardReplay(n)=99 hard2D(n)=99 : hard3D(n)=99 hardSound(n)=99 : hardMusic(n)=99 n=35 : hardBrand$(n)="Microsoft" : hardTitle$(n)="X-Box 720" hardModel$(n)="XBox" : hardCom$(n)="Laptop" : hardTV$(n)="BigTV" hardWeek(n)=1 : hardMonth(n)=4 : hardYear(n)=2013 hardCost(n)=200000 : hardRetail(n)=10 : hardFormat(n)=0 : hardHandheld(n)=0 hardGameplay(n)=99 : hardReplay(n)=99 hard2D(n)=99 : hard3D(n)=99 hardSound(n)=99 : hardMusic(n)=99 ;update list ;no_machines=n ;/////////////////////////////////////////////////////// ;----------------- RELATED FUNCTIONS ------------------- ;/////////////////////////////////////////////////////// ;COUNT MACHINES Function CountMachines(task) ;0=released, 1=owned, 2=active value=0 For v=1 To no_machines If hardReleased(v)>0 If task=0 Then value=value+1 If task=1 And hardOwned(v)>0 Then value=value+1 If task=2 And hardPromotion#(v)>-99 Then value=value+1 EndIf Next Return value End Function ;AVERAGE HARDWARE STATS Function AverageHardwareStats(cyc) value=hardGameplay(cyc)+hardReplay(cyc)+hard2D(cyc)+hard3D(cyc)+hardSound(cyc)+hardMusic(cyc) value=value/6 Return value End Function ;FIND INDUSTRY STANDARDS Function FindIndustryStandards() For cyc=1 To 7 hardStandard(cyc)=0 Next For v=1 To no_machines If hardReleased(v)>0 If v<>18 And v<>36 If hardGameplay(v)=>hardStandard(1) Then hardStandard(1)=hardGameplay(v) : hardLeader(1)=v If hardReplay(v)=>hardStandard(2) Then hardStandard(2)=hardReplay(v) : hardLeader(2)=v If hard2D(v)=>hardStandard(3) Then hardStandard(3)=hard2D(v) : hardLeader(3)=v If hard3D(v)=>hardStandard(4) Then hardStandard(4)=hard3D(v) : hardLeader(4)=v If hardSound(v)=>hardStandard(5) Then hardStandard(5)=hardSound(v) : hardLeader(5)=v If hardMusic(v)=>hardStandard(6) Then hardStandard(6)=hardMusic(v) : hardLeader(6)=v EndIf If AverageHardwareStats(v)=>hardStandard(7) Then hardStandard(7)=AverageHardwareStats(v) : hardLeader(7)=v EndIf Next End Function ;CALCULATE HARDWARE SALES PercentOf () Function GetHardwareSales(cyc) sales=0 ;sales=sales+PercentOf#(hardGameplay(cyc),GetPercent#(hardGameplay(cyc),hardStandard(1))) ;sales=sales+PercentOf#(hardReplay(cyc),GetPercent#(hardReplay(cyc),hardStandard(2))) ;sales=sales+PercentOf#(hard2D(cyc),GetPercent#(hard2D(cyc),hardStandard(3))) ;sales=sales+PercentOf#(hard3D(cyc),GetPercent#(hard3D(cyc),hardStandard(4))) ;sales=sales+PercentOf#(hardSound(cyc),GetPercent#(hardSound(cyc),hardStandard(5))) ;sales=sales+PercentOf#(hardMusic(cyc),GetPercent#(hardMusic(cyc),hardStandard(6))) ;sales=sales*sales sales=sales+hardGameplay(cyc) sales=sales+hardReplay(cyc) sales=sales+hard2D(cyc) sales=sales+hard3D(cyc) sales=sales+hardSound(cyc) sales=sales+hardMusic(cyc) prowess=0 prowess=prowess+GetPercent#(hardGameplay(cyc),hardStandard(1)) prowess=prowess+GetPercent#(hardReplay(cyc),hardStandard(2)) prowess=prowess+GetPercent#(hard2D(cyc),hardStandard(3)) prowess=prowess+GetPercent#(hard3D(cyc),hardStandard(4)) prowess=prowess+GetPercent#(hardSound(cyc),hardStandard(5)) prowess=prowess+GetPercent#(hardMusic(cyc),hardStandard(6)) sales=(sales*prowess)/2 If optTime=1 Then sales=sales/2 If hardUsers(cyc)>1000000 Then sales=sales/2 sales=PercentOf#(sales,hardPromotion#(cyc)) GetPercent#( value#, maxvalue#) Return (maxvalue / value) * 100.0 End Function ;BRAND ACTIVE FOR EXCLUSIVITY? Function BrandActive(brand$) value=0 For v=1 To no_machines If hardReleased(v)>0 And hardBrand$(v)=brand$ And hardPromotion#(v)>-50 Then value=1 Next Return value End Function ;FORMAT IN USE? Function FormatActive(format) value=0 For v=1 To no_machines If hardReleased(v)>0 And hardFormat(v)=format And hardPromotion#(v)>-50 Then value=1 Next Return value End Function My code. how do i get past expecting end-of-file |
| ||
Wrap your code in [ codebox]...[ /codebox]-tags please. Edit. was late when posting, meant codebox instead of codeblock. bye Ron |
| ||
any help? |
| ||
how do i get past expecting end-of-file That could mean anything really. But is most likely related to a syntax error with missing End scope or something.Or it might be this line. ;CALCULATE HARDWARE SALES PercentOf ()The function expects 2 arguments. But its no point in calling it there, as its only function is to produce a value (which is just discarded). |
| ||
Can someone find the duplicate identifier here?;////////////////////////////////////////////////////////////////////////////// ;--------------------------- UNIVERSAL FUNCTIONS ------------------------------ ;////////////////////////////////////////////////////////////////////////////// ;PRODUCE VARIANT SOUND Function ProduceSound(entity,sound,pitch,vol#) ;fluctuate pitch range1=pitch-(pitch/8) range2=pitch+(pitch/16) pitcher=Rnd(range1,range2) ;fluctuate volume If vol#=0 Then vol#=Rnd(0.4,1.2) If vol#>1.0 Then vol#=1.0 ;deliver sound If sound>0 And (gotim>0 Or screen<>50) If pitch>0 Then SoundPitch sound,pitcher SoundVolume sound,vol# If screen=50 If entity=<0 Then EmitSound sound,cam If entity>0 Then EmitSound sound,entity Else PlaySound sound EndIf ;reset If pitch>0 Then SoundPitch sound,pitch SoundVolume sound,1 EndIf End Function ;--------------------------------------------------------------------------- ;///////////////////////////// GRAPHICAL /////////////////////////////////// ;--------------------------------------------------------------------------- ;OUTLINE Function Outline(script$,x,y,r1,g1,b1,r2,g2,b2) ;outline If r1<>r2 Or g1<>g2 Or b1<>b2 Color r1,g1,b1 Text x+2,y+2,script$,1,1 Text x+1,y,script$,1,1 Text x-1,y,script$,1,1 Text x,y+1,script$,1,1 Text x,y-1,script$,1,1 EndIf ;core Color r2,g2,b2 Text x,y,script$,1,1 End Function ;OUTLINE STRAIGHT Function OutlineStraight(script$,x,y,r1,g1,b1,r2,g2,b2) ;outline If r1<>r2 Or g1<>g2 Or b1<>b2 Color r1,g1,b1 Text x+2,y+2,script$,0,1 Text x+1,y,script$,0,1 Text x-1,y,script$,0,1 Text x,y+1,script$,0,1 Text x,y-1,script$,0,1 EndIf ;core Color r2,g2,b2 Text x,y,script$,0,1 End Function ;PLOT BOLD LINE Function DrawLine(startX,startY,endX,endY,r,g,b) ;outline Color 0,0,0 Line startX-1,startY,endX-1,endY Line startX+1,startY,endX+1,endY Line startX,startY-1,endX,endY-1 Line startX,startY+1,endX,endY+1 ;coloured line Color r,g,b Line startX,startY,endX,endY End Function ;RESOLUTION X FIX Function rX#(x#) factor#=800.0/Float(GraphicsWidth()) newX#=x#/factor# Return newX# End Function ;RESOLUTION Y FIX Function rY#(y#) factor#=600.0/Float(GraphicsHeight()) newY#=y#/factor# Return newY# End Function ;--------------------------------------------------------------------------- ;//////////////////////////// MATHEMATICAL ///////////////////////////////// ;--------------------------------------------------------------------------- ;CALCULATE HEIGHT IN FEET & INCHES Function GetHeight$(value) feet=value/12 inches=value-(feet*12) ft$=(feet+5)+"'" in$=inches+"''" figure$=ft$+in$ Return figure$ End Function ;CALCULATE 1'000'000 FIGURE Function GetFigure$(value) minus=0 If value<0 Then minus=1 : value=value-(value*2) ;get segments hundreds=0 : thousands=0 : millions=0 millions=value/1000000 If millions<0 Then millions=0 thousands=(value-(millions*1000000))/1000 If thousands<0 Then thousands=0 hundreds=value-((millions*1000000)+(thousands*1000)) If hundreds<0 Then hundreds=0 ;piece together hun$=hundreds If thousands>0 Then tho$=thousands Else tho$="" If millions>0 Then mil$=millions Else mil$="" If (thousands>0 Or millions>0) Then hun$="'"+hundreds If (thousands>0 Or millions>0) And hundreds<100 Then hun$="'0"+hundreds If (thousands>0 Or millions>0) And hundreds<10 Then hun$="'00"+hundreds If millions>0 Then tho$="'"+thousands If millions>0 And thousands<100 Then tho$="'0"+thousands If millions>0 And thousands<10 Then tho$="'00"+thousands ;return If minus=0 Then figure$=mil$+tho$+hun$ If minus=1 Then figure$="-"+mil$+tho$+hun$ Return figure$ End Function ;TRANSLATE NUMBER INTO DIGITS Function Dig$(value,degree) digits$=value If value<degree Then digits$="0"+digits$ If value<degree/10 Then digits$="0"+digits$ If value=0 And degree=10 Then digits$="00" If value=0 And degree=100 Then digits$="000" Return digits$ End Function ;GET FIGURE TO NEAREST ??? Function RoundOff(value,degree) floater#=value/degree inty=Int(floater#) returner=inty*degree Return returner End Function ;PURSUE FIGURE Function PursueFigure(current,target) ;working values differ=target-current value=0 ;negative values If differ<0 Then value=-1 If differ=<-10 Then value=-10 If differ<-200 Then value=-100 If differ<-2000 Then value=-1000 If differ<-20000 Then value=-10000 If differ<-200000 Then value=-100000 If differ<-2000000 Then value=-1000000 ;positive values If differ>0 Then value=1 If differ=>10 Then value=10 If differ>200 Then value=100 If differ>2000 Then value=1000 If differ>20000 Then value=10000 If differ>200000 Then value=100000 If differ>2000000 Then value=1000000 Return value End Function ;REACHED VALUE? Function Reached(curr#,dest#,range) value=0 If curr#>dest#-range And curr#<dest#+range Then value=1 Return value End Function ;REACHED CO-ORDINATE? Function ReachedCord(currX#,currZ#,destX#,destZ#,range) value=0 If currX#=>destX#-range And currX#=<destX#+range And currZ#=>destZ#-range And currZ#=<destZ#+range Then value=1 Return value End Function ;CLEAN GIVEN ANGLE Function CleanAngle#(angle#) its=0 Repeat If angle#<0 Then angle#=angle#+360 If angle#=>360 Then angle#=angle#-360 its=its+1 Until (angle#=>0 And angle#=<359) Or its>100 Return angle# End Function ;FIND BEST ANGLE ROUTE Function ReachAngle#(sA#,tA#,speed#) ;clean angles sA#=CleanAngle#(sA#) tA#=CleanAngle#(tA#) ;get negative route neg=0 : checkA#=sA# Repeat neg=neg+1 checkA#=checkA#-1 If checkA#<0 Then checkA#=359 Until checkA#=>tA#-1 And checkA#=<tA#+1 ;get positive route pos=0 : checkA#=sA# Repeat pos=pos+1 checkA#=checkA#+1 If checkA#>359 Then checkA#=0 Until checkA#=>tA#-1 And checkA#=<tA#+1 ;return shortest route If neg<pos Then value#=-speed# Else value#=speed# Return value# End Function ;SATISFIED TARGET ANGLE? Function SatisfiedAngle(sA#,tA#,range) value=0 ;clean working angles sA#=CleanAngle#(sA#) tA#=CleanAngle#(tA#) ;scan clockwise angler#=sA# For count=1 To range If angler#=>tA#-1 And angler#=<tA#+1 Then value=1 angler#=angler#+1 If angler#>360 Then angler#=0 Next ;scan counter-clockwise angler#=sA# For count=1 To range If angler#=>tA#-1 And angler#=<tA#+1 Then value=1 angler#=angler#-1 If angler#<0 Then angler#=360 Next Return value End Function ;CALCULATE DIFFERENCE (between any 2 numbers) Function GetDiff#(source#,dest#) diff#=dest#-source# If diff#<0 Then diff#=MakePositive#(diff#) Return diff# End Function ;CALCULATE CENTRE (of any 2 numbers) Function GetCentre#(source#,dest#) If source#<dest# centre#=source#+(GetDiff#(source#,dest#)/2) Else centre#=dest#+(GetDiff#(source#,dest#)/2) EndIf Return centre# End Function ;CALCULATE DISTANCE (between any 2 sets of co-ordinates) Function GetDistance#(sourceX#,sourceZ#,destX#,destZ#) diffX#=GetDiff#(sourceX#,destX#) diffZ#=GetDiff#(sourceZ#,destZ#) If diffX#>diffZ# Then distance#=diffX# Else distance#=diffZ# Return distance# End Function ;CALCULATE HIGHEST VALUE Function HighestValue#(valueA#,valueB#) highest#=valueA# If valueB#>valueA# Then highest#=valueB# Return highest# End Function ;CALCULATE LOWEST VALUE Function LowestValue#(valueA#,valueB#) lowest#=valueA# If valueB#<valueA# Then lowest#=valueB# Return lowest# End Function ;SMOOTH TRAVELLING SPEEDS Function GetSmoothSpeeds(x#,tX#,y#,tY#,z#,tZ#,factor) ;calculate differences & identify leader diffX#=GetDiff#(x#,tX#) lead#=diffX# : leader=1 diffY#=GetDiff#(y#,tY#) If diffY#>lead# Then lead#=diffY# : leader=2 diffZ#=GetDiff#(z#,tZ#) If diffZ#>lead# Then lead#=diffZ# : leader=3 ;make anchor speed from leading difference anchor#=lead#/factor ;calculate respective speeds If leader=1 Then speedX#=anchor# Else speedX#=anchor#*(diffX#/lead#) If leader=2 Then speedY#=anchor# Else speedY#=anchor#*(diffY#/lead#) If leader=3 Then speedZ#=anchor# Else speedZ#=anchor#*(diffZ#/lead#) End Function ;FORCE MINUS INTO POSITIVE Function MakePositive#(value#) If value#<0 positive#=value#-(value#*2) Else positive#=value# EndIf Return positive# End Function ;CALCULATE PERCENTAGE OF VALUE Function PercentOf#(valueA#,percent#) valueB#=(valueA#/100)*percent# Return valueB# End Function ;CALCULATE VALUE AS PERCENT Function GetPercent#(valueA#,valueB#) percent#=0 If valueB#>0 Then percent#=(valueA#/valueB#)*100 Return percent# End Function ;DESCRIBE NUMBER Function DescribeNumber$(value) description$=value+"th" If value=1 Then description$="1st" If value=2 Then description$="2nd" If value=3 Then description$="3rd" If value>20 For count=2 To value/10 If value=(count*10)+1 Then description$=value+"st" If value=(count*10)+2 Then description$=value+"nd" If value=(count*10)+3 Then description$=value+"rd" Next EndIf Return description$ End Function |
| ||
@spear30 Please use: [ codebox] code here [ /codebox] but without the space after the [ It puts the code into a box that scrolls so we don't have a page with a length comparable to War and Peace. If Blitz3d has it, put Strict or Superstrict as the first line of your code. I combed through quite a bit of the code first checking for 'local' or 'global' keywords typical of defining a variable, but noticed that there is only one use of 'local' in your code. Then I checked to make sure you didn't name a function the same as another existing function. That looks fine. Then I started from the bottom up looking through each function. And... I don't have time for it right now. But I didn't find a duplicate identifier. Is this all the code? I'd suggest that you just go through it again, putting more space between commands so it's easier to read when you go back over it. I've solved numerous problems by just going over my code again, line by line, thinking out how each line works and fits into the larger code as a whole. Also if you want to make a negative number positive you can always multiply by -1. |
| ||
why is there a mav occuring when i run the file? |
| ||
Thanks for the codebox, would you mind editing your other posts to include them as well? I downloaded blitz3d and ran your code. Not sure what a 'mav' is. Of course I can't do much help without your include files. Also I'm not sure how you can assign a function to another function. deskGame(cyc,v)=chartGame(Rnd(2,20)) I get an error of ")" expected on that line of code. Leads me to believe deskGame() only requires one variable. Maybe I'm just not thinking outside the box. It's been a long day. EDIT: So I googled "mdickie" and found his site, downloaded his .zip code for "Under Development" and checked it out. Did you place the files in the correct folder of the game installation for 'Under Development'? He doesn't leave very detailed instructions on exactly where to place the files, so maybe that's the problem. |
| ||
i have them in the main folder for under development. not sure where else they go. |
| ||
Me neither. Since it's not your code and you aren't familiar with it like the original developer is, I think this will be a difficult undertaking. Try contacting him, see what he says. Or change up the directory where you put his .bb files. Or delete all .bb files and re-download them from his site and place them back. |
| ||
I found the problem and got it working for me. Here's what I did I downloaded the game and place all the .bb code files in the same directory as the Under Development (Windowed).exe file. I ran the Main.bb and got a graphics error. I found out that he was trying to initialize the graphics3d command using 16 bit depth. This line of code is found in the 'Menus.bb' file. The debug window that pops up shows that. Here's the code you need to change: Menus.bb ;make transition? If width<>GraphicsWidth() Or height<>GraphicsHeight() If task>0 Then Loader("Please Wait","Adjusting Resolution") Graphics3D width,height,16,1+optWindow If task>0 ;restore media So right here: Graphics3D width,height,32,1+optWindow I changed this number to 32, and wala! FYI If you didn't know this already, you can only Build and Run the 'Main.bb' file. Any attempt to build or run the other files will result in an error of some sort, as all the files are dependent upon one another. Basically, instead of having one GIANT MASSIVE .bb file, he split off chuncks of code into separate files to be more organized. This guys code is pretty messy. If you want to get into coding start by putting more space between the lines and DEFINITELY use comments. Because you'll forget what you did or why you did it once you have 500+ lines of code. |
| ||
Next question. How would I make this windowed? |
| ||
Does it work for you? Your welcome by the way. Google "blitz3d graphics3d" and follow the first link. Read. |