Quote: "Quote: "I have a similar problem that Coder51223 noted as follows: Error Pixel shader failed to compile 0(18):error C0000: syntax error, unexpected ';', expecting ')' at token ";" in main.agc at line 4566."
I had a look through the default shaders and couldn't immediately see anything that would cause this error. Are you able to replicate it in a small example, or to send me your project for testing?"
Paul,
Thank you. I located the offending command "SetGenerateMipmaps (1)". If I use the command and then try to set more than one image to an object, then I receive the shader error that I mentioned.
The sample code creates the error for me and I attached some images I use:
// Project: Test Shader
// Created: 2017-09-12
// show all errors
SetErrorMode(2)
// set window properties
SetWindowTitle( "Test Shader Error" )
SetWindowSize( 1920, 1080, 0 )
SetWindowAllowResize( 1 ) // allow the user to resize the window
SetSyncRate( 30, 0 ) // 30fps instead of 60 to save battery
SetScissor( 0,0,0,0 ) // use the maximum available screen space, no black borders
UseNewDefaultFonts( 1 ) // since version 2.0.22 we can use nicer default fonts
Portrait = 0
Landscape = 1
Resolution = 0
ScreenWidth# = 100.0
ScreenHeight# = 100.0
SetOrientationAllowed( Portrait, Portrait, Landscape, Landscape )
SetVirtualResolution( ScreenWidth#, ScreenHeight# ) : `Don't change these. Having a percentage based system enables the maximum device compatibility.
OverScanLeft# = GetScreenBoundsLeft()
OverScanRight# = GetScreenBoundsRight()
SetDisplayAspect( (1920 + 0.0) / (1080 + 0.0)) //GetDeviceWidth() + 0.0 ) / ( GetDeviceHeight() + 0.0 ) )
SetCameraRange( 1, 1, 50000 )
SetCameraPosition(1, 0, 10, -1500)
SetCameraLookAt(1, 0, 5, 50, 0)
SetGenerateMipmaps( 1 )
SetSunActive( 1 )
SetSunColor( 255,255,255 )
SetSunDirection( 0, -770, 1000 ) //Points sun towards the ground and to the back of the scene
Global Box as Integer=1
CreateSign()
do
Print( ScreenFPS() )
Sync()
loop
Function CreateSign()
CreateObjectBox(Box, 40, 26, 5 )
Sign1=loadImage("WoodSign.png")
SignB=loadImage("WoodSignBMP.png")
CreateObjectBox(7,5,20,5)
//SetObjectImage(7,Sign1,0)
//SetObjectImage(7,SignB,1)
setObjectImage(Box,Sign1,0)
setObjectImage(Box,SignB,1)
SetObjectPosition( Box, -32, -323, -330 )
RotateObjectLocalY(Box,-2)
SetObjectPosition(7,-32,-338,-325)
RotateObjectLocalY(7,-2)
Endfunction