Template:Sdk minimal example: Difference between revisions
Jump to navigation
Jump to search
Roy Curtis (talk | contribs) Created page with ":''This is a minimal program example which contains no error checking'' <c> #include <vpsdk/VP.h> #include <stdio.h> #include <stdlib.h> #define Username "User" #define Passw..." |
Roy Curtis (talk | contribs) m example fix |
||
Line 25: | Line 25: | ||
</c><noinclude> | </c><noinclude> | ||
== Usage == | == Usage == | ||
This template should be {{code|subst:}}'d into the article to dump a copy of the above code in it, for modification by using: {{code|<nowiki>{{subst:sdk minimal example | This template should be {{code|subst:}}'d into the article to dump a copy of the above code in it, for modification by using: {{code|<nowiki>{{subst:sdk minimal example}}</nowiki>}} | ||
[[Category:Subpage templates]] | [[Category:Subpage templates]] | ||
</noinclude> | </noinclude> |
Latest revision as of 04:10, 25 August 2013
- This is a minimal program example which contains no error checking
<c>
- include <vpsdk/VP.h>
- include <stdio.h>
- include <stdlib.h>
- define Username "User"
- define Password "1234"
- define World "VP-Build"
int main(int argc, char ** argv) {
vp_init(VPSDK_VERSION);
VPInstance sdk = vp_create();
vp_connect_universe(sdk, "universe.virtualparadise.org", 57000); vp_login(sdk, Username, Password, "VPBot"); vp_enter(sdk, World); vp_state_change(sdk); while(vp_wait(sdk, 1000) == 0){} return 0;
} </c>
Usage
This template should be subst:
'd into the article to dump a copy of the above code in it, for modification by using: {{subst:sdk minimal example}}