LoginLogin
Nintendo shutting down 3DS + Wii U online services, see our post

A lil help :-)

Root / Programming Questions / [.]

Jacklack3Created:
So i have been using DEF commands to make my plugin for smilebasic! But i was wondering... Is there a way to have like a string to use? Like how would this
DEF PRINT (text)
PRINT (text)
Translate to SmileBasic?

DEF SAY TEXT$
PRINT TEXT$
END
'---
SAY "HELLO!"
That's the gist of it.

DEF SAY TEXT$
PRINT TEXT$
END
'---
SAY "HELLO!"
That's the gist of it.
Thanks!

So you're trying to make basic more basic?

So you're trying to make basic more basic?
No i was just using that as a example.

Say is in my interpreter as 'print'

DEF SAY TEXT$
PRINT TEXT$
END
'---
SAY "HELLO!"
That's the gist of it.
For some reason im getting a error called Type mismatch in (blah) Im using a repeat and until command UNTIL ALARM==ANOT$ is what its saying i mistyped i guess.

Need to see your source code.

DEF SAY TEXT$
PRINT TEXT$
END
'---
SAY "HELLO!"
That's the gist of it.
For some reason im getting a error called Type mismatch in (blah) Im using a repeat and until command UNTIL ALARM==ANOT$ is what its saying i mistyped i guess.
What are the values of ALARM and ANOT$? There would be a type mismatch error because ALARM is a real/int type(depending on the OPTION) as it doesn't have a type suffix and ANOT$ is a string as it has the $ suffix.

DEF SAY TEXT$
PRINT TEXT$
END
'---
SAY "HELLO!"
That's the gist of it.
For some reason im getting a error called Type mismatch in (blah) Im using a repeat and until command UNTIL ALARM==ANOT$ is what its saying i mistyped i guess.
What are the values of ALARM and ANOT$? There would be a type mismatch error because ALARM is a real/int type(depending on the OPTION) as it doesn't have a type suffix and ANOT$ is a string as it has the $ suffix.
Well it plays a alarm sound and it basically loops and it stops looping when the amount of alarms playing was the number you inputed. So as a example i put 1 so it would play a alar noise. It works but then the error occurs.

DEF SAY TEXT$
PRINT TEXT$
END
'---
SAY "HELLO!"
That's the gist of it.
For some reason im getting a error called Type mismatch in (blah) Im using a repeat and until command UNTIL ALARM==ANOT$ is what its saying i mistyped i guess.
What are the values of ALARM and ANOT$? There would be a type mismatch error because ALARM is a real/int type(depending on the OPTION) as it doesn't have a type suffix and ANOT$ is a string as it has the $ suffix.
Well it plays a alarm sound and it basically loops and it stops looping when the amount of alarms playing was the number you inputed. So as a example i put 1 so it would play a alar noise. It works but then the error occurs.
The string "1" is not equal to the number 1. You need to convert to a number with the VAR() function. Change it to UNTIL ALARM==VAL(ANOT$) and it should work.