Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / DarkNet - Cube World

Author
Message
Sam
22
Years of Service
User Offline
Joined: 17th Oct 2003
Location:
Posted: 24th Jun 2011 10:41 Edited at: 24th Jun 2011 10:51
Hi everyone,

Just purchased DarkNet and have been trying to compile the networking example code "Cube World". I am getting the following error: "Could not understand command at line 21." I didn't change anything the first time.

Line 21 reads: mn Set Local 0, LocalHost$, 6565, LocalHost$, 6565

Here is the complete code (Server):



And here is the Client:



I tried changing line 19 from "LocalHost$ = mn DNS("localhost") to "LocalHost$ = mn DNS("78.86.18.153")"

Also, I am not sure if DarkNet installed properly or the syntax might be outdated because mn Set Local does not turn blue like the other commands. Only the Local part does. I looked at the documentation and the command was actually written like this mnSetLocal without spaces. But when I try it like that it does not work at all.

Do I need DarkGDK installed for DarkNet to work properly? I am not using the Visual Studio C++ IDE. Only the Dark Basic Professional IDE. When I run the installation programs (DB Pro Installer.exe and MikeInstall.exe), the only one that completes successfully is the DB Pro Installer. The other stops halfway and I get an error: "Error whilst finding files. Error code: 3".

Thanks...
KISTech
18
Years of Service
User Offline
Joined: 8th Feb 2008
Location: Aloha, Oregon
Posted: 24th Jun 2011 17:05
The DBPro installer should be the one you want.

The commands will only turn blue if the keywords file is updated for the IDE. Check your IDE for a command to Rebuild the Keywords, then restart the IDE and it should highlight things properly.

For DBPro command syntax you'll put spaces in. The documentation is written the way the commands would be entered in DGDK, but aside from the spaces there's no other difference.

There may be some discrepancies in documentation and examples between the versions. I don't know if he got all of those updated when he released version 2. You might check the DarkNet thread in Program Announcements.

Sam
22
Years of Service
User Offline
Joined: 17th Oct 2003
Location:
Posted: 26th Jun 2011 14:11 Edited at: 26th Jun 2011 14:12
That was a really good suggestion. I have tried what you said, but I get the same error: Could not understand command at line 21. mn Set Local 0,LocalHost$,0,LocalHost$,0. The "mn Set" is not highlighted in blue like it should in order to complete the syntax for a DBPro command "mn Set Local". I have the latest DBPro IDE and have rebuild the keyword list available under "Tools > Rebuild Keywords". I have attached a screenshot.

Any more ideas?
Michael P
20
Years of Service
User Offline
Joined: 6th Mar 2006
Location: London (UK)
Posted: 26th Jun 2011 22:22
That demo code is from v1, did that come with the download from TGC? It shouldn't have !

Here is the updated demo code for v2 and up:

Server:


Client:


Sam
22
Years of Service
User Offline
Joined: 17th Oct 2003
Location:
Posted: 27th Jun 2011 02:12
Michael P, you are a life saver!

Quote: "That demo code is from v1, did that come with the download from TGC? It shouldn't have !"


Yes, it appears to be that way. Maybe someone needs to update the files so that someone else who purchases DarkNet does not get stuck with the same problem as I had for the past week. I am pretty sure I knocked my self out a couple of times from hitting my head against my computer desk.

Anyway, everything works fine now. Thank you very much!

Login to post a reply

Server time is: 2026-07-11 07:06:09
Your offset time is: 2026-07-11 07:06:09