Error using method module.

BlitzMax Forums/BlitzMax Beginners Area/Error using method module.

Yue(Posted 2016) [#1]


Any suggestions

Module.
Global xSetEngineSetting(parameter$z, value$z) "win32"
...
xSetEngineSetting = GetProcAddress(lib, "_xSetEngineSetting@8")



col(Posted 2016) [#2]
Hi Yue,

The issue may be somewhere else in your code.
I've just run your example in NG and Legacy Blitzmax, both compile ok.

Do you have any lines of code that call 'xSetEngineSetting'? I would check the parameters there.


Yue(Posted 2016) [#3]
Hi Col.




The error happens here , I tested in Blitz3D and functioning properly , also in PureBasic , but BlitzMax not work. The parameter receives a string and a value.


Brucey(Posted 2016) [#4]
Try using Null instead of 0.


Yue(Posted 2016) [#5]
Hello Brucey , using null Error.




	'xSetEngineSetting("Splash::TilingTime",0)
	'xSetEngineSetting("Splash::AfterTilingTime",0)
	'xSetEngineSetting( "Engine::Multithreaded" ,True)

xSetEngineSetting("Splash::TileSize",Null )



Yue(Posted 2016) [#6]
Ok , the problem has been resolved. the two values ​​were receiving a value of type string. My confusion was that Blitz3D , put a zero and evaluated without problems , my mistake, sorry.

xSetEngineSetting("Splash::TileSize","0" )
xSetEngineSetting("Splash::TilingTime","0")
xSetEngineSetting("Splash::AfterTilingTime","0")
xSetEngineSetting( "Engine::Multithreaded" ,"1")

Print xGetEngineSetting("Engine::Multithreaded")




Floyd(Posted 2016) [#7]
xSetEngineSetting(parameter$z, value$z)

Apparently xSetEngineSetting wants two strings. If value is supposed to be zero then try "0", or perhaps "0.0".


Oops. Posted 40 seconds too late.


Yue(Posted 2016) [#8]
:) Thanks You Floyd.