How to integrate getOwner() into RPN module?

Game Editor comments and discussion.

How to integrate getOwner() into RPN module?

Postby ericdg » Mon Mar 06, 2006 7:09 am

Would it be complicated to integrate this new feature into the current RPN module by beyondthetech and dark.

Would getOwner() work for smartphone as well as pocket pc?
ericdg
 
Posts: 53
Joined: Tue Nov 29, 2005 1:18 pm
Score: 1 Give a positive score

Re: How to integrate getOwner() into RPN module?

Postby makslane » Tue Mar 07, 2006 1:14 pm

ericdg wrote:Would it be complicated to integrate this new feature into the current RPN module by beyondthetech and dark


The getOwner() function returns a text, so, you can put the returned text in code, like this:

strcpy(name, getOwner());

Would getOwner() work for smartphone as well as pocket pc?


Yes, it works in both systems
makslane
Site Admin
 
Posts: 3947
Joined: Sat Apr 05, 2003 6:47 pm
Score: 182 Give a positive score

getOwner in RPN module

Postby SanDiego1 » Mon Mar 20, 2006 3:30 am

Hi Ericdg -

I figured out how to incorporate the getOwner into the RPN module/game.

Here's what you do:

Create a global string variable. I named it "ownerData" and saved it into the "owner" group.

Incorporate the RPN module into your game. Once that is done, in the "regsubmit" actor, go to Mouse Down event and then script. You need to add a strcpy line for the owner information and a strcmp line.

The first few lines of the NEW script will read:

transp=0.99;

strcpy(regcode,GetUnlockKey(rpnstring,regname));
strcpy(ownerData, getOwner());

// Must match, have at least 5 characters in name and the reg code should be 5 digits, too

if (strcmp(regcode,regaskcode)==0 && strcmp(regname,ownerData)==0 && strlen(regname)>6 && strlen(regcode)==5)
{
//Show "Thank you" sign!
thankyou.x=0; thankyou.y=0;
EventDisable("keyboard.0",EVENTALL);
EventDisable("keyboard.1",EVENTALL);
ETC.


The new code is "strcpy(ownerData, getOwner());" AND "strcmp(regname,ownerData)==0"


I made it so the minimum letters in the regname had to be six, not five. (You can make this whatever you want but I found it didn't work if you made it a precise number.) Also, I have found that once I incorporated this code into my game, I couldn't go to game preview and enter a name to get through the registration process. Even if I exported it to my PC, I still couldn't get through the registration process on my PC. The only way I could look at the game was downloading it to my PPC.

Hope this helps.
SanDiego1
 
Posts: 20
Joined: Wed Oct 12, 2005 1:08 am
Score: 0 Give a positive score


Return to GE - General

Who is online

Users browsing this forum: No registered users and 1 guest