Template:Sdk minimal example
Jump to navigation
Jump to search
- 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}}