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 Discussion / Help, Plz

Author
Message
3xpLo1t
21
Years of Service
User Offline
Joined: 22nd Nov 2003
Location:
Posted: 27th Nov 2003 05:12
Aight, this is my problem,
this is the section of my code I am having trouble with

These 2 lines:
if path exist("C:\Program Files\Steam\SteamApps\"email$)=1
if path exist("C:\Program Files\Steam\SteamApps\"email$)=0

get errors, the variable email$ IS assaigned a value
so say if i assaigned the variable email$ to [email protected] I want it to change the directory to C:\Program Files\Steam\SteamApps\[email protected]\

I have tried to figure this out, but cant, so can somebody plz help me
Jess T
Retired Moderator
21
Years of Service
User Offline
Joined: 20th Sep 2003
Location: Over There... Kablam!
Posted: 27th Nov 2003 05:19
you need to stick in a plus ( + ) sign. ie:


or another way to do it, would be:


Just remember that when you are adding to a string you need to literally "add" them together with a plus ( + ) sign.

Hope I Helped...


Team EOD :: Programmer/Logical Engineer/All-Round Nice Guy
3xpLo1t
21
Years of Service
User Offline
Joined: 22nd Nov 2003
Location:
Posted: 27th Nov 2003 05:31
u r 1337, thankz man, it worked and I'm back to coding for another 2 hours
3xpLo1t
21
Years of Service
User Offline
Joined: 22nd Nov 2003
Location:
Posted: 27th Nov 2003 06:37
well pooo, i got another question, I want to assign the file size of a file to a variable, this is basically what it looks like so$=file size("blah.dll") but i returns an error
Jess T
Retired Moderator
21
Years of Service
User Offline
Joined: 20th Sep 2003
Location: Over There... Kablam!
Posted: 27th Nov 2003 07:32
you have:


you need:


I put the file size("blah.dll") part all inside of the Str$() command, because the File Size() command returns an integer, not a string, so it needs to be converted to a string before it can be put into a string variable, otherwise the error will be produced.

Hope I Helped...

Btw, what does "1337" mean?


Team EOD :: Programmer/Logical Engineer/All-Round Nice Guy
Phaelax
DBPro Master
22
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 27th Nov 2003 09:41
Do you understand the difference between an integer and a string variable? Not trying to poke fun, but its obvious you're fairly new at coding so you may not understand it yet.

As for "1337", its LEET, or more correctly, elite. Hacker writing, use every possible symbol to write a word without using the correct one. Gets quite annoying when trying to read a whole paper like that.
Dmitri
21
Years of Service
User Offline
Joined: 27th Nov 2003
Location:
Posted: 27th Nov 2003 09:49 Edited at: 27th Nov 2003 09:51
uh...yeah.

Speaking about the difference between string variables and integers wouldn't the file size be returned as an integer? In that case it would be

x = file size("blah.dll")
so$ = STR$(x)

I think Jess had the right idea.

It's a long story and there's no punchline...
Jess T
Retired Moderator
21
Years of Service
User Offline
Joined: 20th Sep 2003
Location: Over There... Kablam!
Posted: 27th Nov 2003 11:23
What i posted does that in one line rather than two.

And why would you write in that "hacker code" it's a load of crap...


Team EOD :: Programmer/Logical Engineer/All-Round Nice Guy
JoelJ
21
Years of Service
User Offline
Joined: 8th Sep 2003
Location: UTAH
Posted: 28th Nov 2003 07:34
i HATE "hacker code"

btw: http://www.google.com/intl/xx-hacker/
i love it

=<=Pudgie Wars=>=
Game engine: 20% = Models: 25% = Textures: 1% = Sounds/Music: 0% = www.geocities.com/bigapple_entertainment

Login to post a reply

Server time is: 2025-05-21 17:20:22
Your offset time is: 2025-05-21 17:20:22