Squirrel scripting language wrapper module

BlitzMax Forums/BlitzMax Programming/Squirrel scripting language wrapper module

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

Got an error while building the module for 1.14 in OSX 10.3.9:
Compile Error: Unable to convert from 'String' to 'Byte Ptr'
[/Applications/BlitzMax/mod/de.mod/squirrel.mod/squirrel.bmx;380;3]
Build Error: failed to compile /Applications/BlitzMax/mod/de.mod/squirrel.mod/squirrel.bmx


Edit:

This change compiled, but don't know if it leaks memory or works at all. :)
	Rem
		bbdoc: Used to load and compile a string 
	End Rem
	Method LoadString(Buffer:String,SourceName:String)
		Local bptr:Byte Ptr = buffer.ToCString()
		Local sptr:Byte Ptr = sourcename.ToCString()
		'Return sq_compilebuffer(State,Buffer.ToCString(),Len(Buffer),SourceName,1)
		Local Ret:Int = sq_compilebuffer(State,bptr,Len(Buffer),sptr,1)
		MemFree bptr
		MemFree sptr
		Return ret
	End Method


yet another edit:
Not sure if it is related to the above fix (But I guess it is)
All examples compiles just fine and doesn't crash. But nothing happends when I run them. :P

last edit:
...And that's because a path in a sane operating system uses forward slashes. Everything seemes to work just fine now if I change every \ to / in the examples.