Page 1 of 1
HTML Variable Question
Posted: Wed Nov 12, 2008 4:57 pm
by ccoleman
So trying to make a website that will post variables within my application files to the site.
Problem is the documentation isn't all that helpfull, and the example code doesn't even work. I tried compiling the HtmlVariables example and it's having the same problem my project is, a whole lot of
int DoHtmlVariable(int, WORD)':
htmldata.cpp:85: error: 'TimeTick' was not declared in this scope,
or whatever the value is in the <!--VARIABLE call
So where do these variables have to be declared in order for one to be able to pull their values?
I have my main.cpp, and a web.cpp file, I can call the funciton in my web.cpp using the <!--FUNCTIONCALL just fine, or at least as far as I can tell, so what do I have to do to get variables?
Re: HTML Variable Question
Posted: Thu Nov 13, 2008 3:52 pm
by Forrest
Hello,
Make sure that you have a file htmlvar.h in your project base directory. You should see this file in C:\nburn\examples\Web\HtmlVariables in the example app you are referencing. Do you have this file?
Re: HTML Variable Question
Posted: Tue Nov 18, 2008 10:50 am
by ccoleman
Yes I have an htmlvar.h file, though its not very clear whats supposed to be in here.
What I gathered is that you can do the whole <!--VARIABLE call on known variables, but anything that you make in the program it's best to use the FUNCTIONCALL or the VARIABLE call as a function. This is the only way I could get it to compile.
Then I ran into troubles trying to get the DEBUG to work as it was saying a problem about how there was no htmlvar.h filel, strange as the release builds would compile and run fine.
So looked at the path info for the project again, respecified it again, and it seemed to work better, except now in Debug it's constantly saying it can'd find the source, has a button to click to specify, but that doesn't really do much.
Re: HTML Variable Question
Posted: Sun Nov 23, 2008 1:02 pm
by drdoug
I'm a netburner newbie and am having the same problem with the variables, .h files and the dynamic examples (although most other examples I have tried work fine).
I would appreciate anyone's comments or direction at this point.
Re: HTML Variable Question
Posted: Mon Nov 24, 2008 3:19 pm
by rnixon
The example worked fine for me. Did you see the part in main.cpp comments (at the top) that say you need to add the path of htmlvars.h to the project? Once I did that it worked fine.
Re: HTML Variable Question
Posted: Mon Dec 01, 2008 8:36 pm
by ccoleman
I ended up just using either FUNCTIONCALL to get a variable, or the variable call to use it as a function, both of which work fine. But using the VARIABLE to just return a variable does not seem to work... not sure why, but meh don't see the need if you can just do the same thing with FUNCTIONCALL (well I guess you are writing getters when the VARIABLE call just returns the variable, ahh well)