![]() |
PBASIC Syntax Question
I'm not sure why this happening, but in my PBASIC editor, whenever I try to download the code (for testing), it always returns an error "201 - Expecting '}'", and here's the only thing I have in the code:
'{$STAMP BS2} Even when I use the default code given, it still returns this error. Anyone have an idea why this is happening? <<EDIT>>: If I use the code from RoboEmu (File -> Write Code) in my program, it gives this error, but in the Parallax one it is perfect :<</EDIT>> |
You're talking about the editor you're writing, right? My guess is that you're sending the wrong buffer length to the tokenizer.
|
Quote:
I don't know if this will help, but here is the code I use to tokenize the code: Code:
void CMainFrame::OnDlcode() pView->GetWindowText(szBuffer, pView->GetWindowTextLength()); // Get view window text <-- For some reason, I got a feeling it has to deal w/ this, or the szBuffer part. This is in MFC also. <<EDIT>>: I forgot to say that I was using the wrong way to do the STAMP, it's ' {$STAMP BS2p}, not ' {$STAMP S2p} :<</EDIT>> |
Are you sure szBuffer contains the whole thing? Trying doing a
MessageBox(NULL, szBuffer, "Test", MB_OK); and see what it spits out. |
Quote:
Thanks for the help on that (should've known to do a test on that). Now to figure out why (which I have an idea). << EDIT >>: I found out why...it was because of the SETSEL LPARAM section was probably to small, and plus I needed a space after the '}' in my code for it to register it (argh!) << EDIT 2 >>: I can get it compile or whatever way you think of it (tokenize). Now, does anyone have a thing on making a progress bar move? (Sorry, MSDN is really buggin' me right now). If you wanna know, I used to get the 157 error. But I had to set the first compile boolean to true in order to tokenize successfully. Thanks for all your help people ;) |
| All times are GMT -5. The time now is 00:34. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi