Guys, I want to add something more on the Registeration thing please help -
Ehab1911 - 16.11.2010
Hii, I want to put more than 2 steps in the Registration Steps. So here are the Registration steps:
Код:
if(RegistrationStep[playerid] > 0)
{
if(RegistrationStep[playerid] == 1)
{
new idx;
tmp = strtok(text, idx);
if((strcmp("boy", tmp, true, strlen(tmp)) == 0) && (strlen(tmp) == strlen("boy")))
{
PlayerInfo[playerid][pSex] = 1;
SendClientMessage(playerid, COLOR_YELLOW2, "Ehab_Isaac: So you are a Male, Hello Brother, and Welcome to California RP.");
SendClientMessage(playerid, COLOR_LIGHTRED, "What is your Birthdate? (Use dd/mm/yyyy)");
RegistrationStep[playerid] = 2;
return 0;
}
else if((strcmp("girl", tmp, true, strlen(tmp)) == 0) && (strlen(tmp) == strlen("girl")))
{
PlayerInfo[playerid][pSex] = 2;
SendClientMessage(playerid, COLOR_YELLOW2, "Ehab_Isaac: So you are a Female, Hello Sister! Welcome to California RP! Enjoy your time madam.");
SendClientMessage(playerid, COLOR_LIGHTRED, "What is your Birthdate? (Use dd/mm/yyyy)");
//SendClientMessage(playerid, COLOR_RED, "Are you Gay?");
RegistrationStep[playerid] = 2;
return 0;
}
else
{
SendClientMessage(playerid, COLOR_RED, "Are you a Boy or Girl? (Write Boy if you're a Boy, and Girl if you're a Girl).");
}
return 0;
}
/*else if(RegistrationStep[playerid] == 2)
{
new plus;
tmp = strtok(text, plus);
if((strcmp("no", tmp, true, strlen(tmp)) ==0) && (strlen(tmp) == strlen("no")))
{
PlayerInfo[playerid]GivePlayerMoney(playerid, 10000);
SendClientMessage(playerid, COLOR_YELLOW, " Good, because we don't need gays here :).");
SendClientMessage(playerid, COLOR_YELLOW, " Lets move to the next question .. What is your Birthdate? (use dd/mm/yyy)");
RegistrationStep[playerid] = 3;
return 0;
}*/
else if(RegistrationStep[playerid] == 2)
{
new year, month, day;
getdate(year, month, day);
new DateInfo[3][20];
split(text, DateInfo, '/');
if(year - strvalEx(DateInfo[2]) > 100 || strvalEx(DateInfo[2]) < 1 || strvalEx(DateInfo[2]) >= year)
{
SendClientMessage(playerid, COLOR_GREEN, "What is your Birthdate? (Use dd/mm/yyyy) * It is neccessary to make us know.");
return 0;
}
new check = year - strvalEx(DateInfo[2]);
if(check == year)
{
SendClientMessage(playerid, COLOR_GREEN, "What is your Birthdate? (Use dd/mm/yyyy)* It is neccessary to make us know.");
return 0;
}
if(strvalEx(DateInfo[1]) > month)
{
check -= 1;
}
else if(strvalEx(DateInfo[1]) == month && strvalEx(DateInfo[0]) > day)
{
check -= 1;
}
PlayerInfo[playerid][pAge] = check;
format(string, sizeof(string), "Ok, so you are %d year old.",PlayerInfo[playerid][pAge]);
SendClientMessage(playerid, COLOR_YELLOW2, string);
SendClientMessage(playerid, COLOR_LIGHTRED, "Thank you for filling in all the information, you will now proceed to the Tutorial.");
RegistrationStep[playerid] = 0;
PlayerInfo[playerid][pOrigin] = 1;
TutTime[playerid] = 1;
CanTalk[playerid] = 0;
return 0;
}
return 0;
}
The thing that I wanted to add but I faild is the green one .. What's the problem with it I don't understand
Errors and Warnings when I compile when I remove the /* */ from the Step that I've made:
Код:
C:\Users\Ehab Isaac\Documents\My Received Files\sarp.pwn(2328) : error 004: function "FixHour" is not implemented
C:\Users\Ehab Isaac\Documents\My Received Files\sarp.pwn(11881) : error 017: undefined symbol "encode_tires"
C:\Users\Ehab Isaac\Documents\My Received Files\sarp.pwn(11899) : error 017: undefined symbol "encode_tires"
C:\Users\Ehab Isaac\Documents\My Received Files\sarp.pwn(14412) : error 004: function "FixHour" is not implemented
C:\Users\Ehab Isaac\Documents\My Received Files\sarp.pwn(15372) : error 004: function "FixHour" is not implemented
C:\Users\Ehab Isaac\Documents\My Received Files\sarp.pwn(15440) : error 004: function "FixHour" is not implemented
C:\Users\Ehab Isaac\Documents\My Received Files\sarp.pwn(15656) : error 004: function "Random" is not implemented
C:\Users\Ehab Isaac\Documents\My Received Files\sarp.pwn(18447) : error 017: undefined symbol "CreateStrip"
C:\Users\Ehab Isaac\Documents\My Received Files\sarp.pwn(18478) : error 017: undefined symbol "DeleteClosestStrip"
C:\Users\Ehab Isaac\Documents\My Received Files\sarp.pwn(18506) : error 017: undefined symbol "DeleteAllStrip"
C:\Users\Ehab Isaac\Documents\My Received Files\sarp.pwn(21395) : error 004: function "FixHour" is not implemented
C:\Users\Ehab Isaac\Documents\My Received Files\sarp.pwn(40723) : warning 215: expression has no effect
C:\Users\Ehab Isaac\Documents\My Received Files\sarp.pwn(40723) : error 001: expected token: ";", but found "-identifier-"
C:\Users\Ehab Isaac\Documents\My Received Files\sarp.pwn(40729) : warning 217: loose indentation
C:\Users\Ehab Isaac\Documents\My Received Files\sarp.pwn(40764) : warning 217: loose indentation
C:\Users\Ehab Isaac\Documents\My Received Files\sarp.pwn(40766) : warning 217: loose indentation
C:\Users\Ehab Isaac\Documents\My Received Files\sarp.pwn(41405) : warning 217: loose indentation
C:\Users\Ehab Isaac\Documents\My Received Files\sarp.pwn(41405) : error 029: invalid expression, assumed zero
C:\Users\Ehab Isaac\Documents\My Received Files\sarp.pwn(41405) : error 004: function "ClosePDDoor" is not implemented
C:\Users\Ehab Isaac\Documents\My Received Files\sarp.pwn(41414) : warning 225: unreachable code
C:\Users\Ehab Isaac\Documents\My Received Files\sarp.pwn(41414) : error 029: invalid expression, assumed zero
C:\Users\Ehab Isaac\Documents\My Received Files\sarp.pwn(41414) : error 004: function "FixHour" is not implemented
C:\Users\Ehab Isaac\Documents\My Received Files\sarp.pwn(41416) : error 017: undefined symbol "hour"
C:\Users\Ehab Isaac\Documents\My Received Files\sarp.pwn(41416) : error 017: undefined symbol "hour"
C:\Users\Ehab Isaac\Documents\My Received Files\sarp.pwn(41416) : warning 215: expression has no effect
C:\Users\Ehab Isaac\Documents\My Received Files\sarp.pwn(41417) : error 017: undefined symbol "hour"
C:\Users\Ehab Isaac\Documents\My Received Files\sarp.pwn(41419) : error 017: undefined symbol "hour"
C:\Users\Ehab Isaac\Documents\My Received Files\sarp.pwn(41419) : error 017: undefined symbol "hour"
C:\Users\Ehab Isaac\Documents\My Received Files\sarp.pwn(41419) : warning 215: expression has no effect
C:\Users\Ehab Isaac\Documents\My Received Files\sarp.pwn(41421) : error 017: undefined symbol "hour"
C:\Users\Ehab Isaac\Documents\My Received Files\sarp.pwn(41423) : error 017: undefined symbol "hour"
C:\Users\Ehab Isaac\Documents\My Received Files\sarp.pwn(41423) : error 017: undefined symbol "hour"
C:\Users\Ehab Isaac\Documents\My Received Files\sarp.pwn(41423) : warning 215: expression has no effect
C:\Users\Ehab Isaac\Documents\My Received Files\sarp.pwn(41425) : error 017: undefined symbol "hour"
C:\Users\Ehab Isaac\Documents\My Received Files\sarp.pwn(41429) : warning 225: unreachable code
C:\Users\Ehab Isaac\Documents\My Received Files\sarp.pwn(41429) : error 029: invalid expression, assumed zero
Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
26 Errors.
Could you please tell me what to do :S?
Re: Guys, I want to add something more on the Registeration thing please help -
XePloiT - 16.11.2010
well as i see it you copied from somewhere the code and just putted it in yours...
you need to copy the variables too...
Re: Guys, I want to add something more on the Registeration thing please help -
Ehab1911 - 16.11.2010
Well it is my Gamemode.. And I am trying to put more Registration Steps :S, what do you mean by " You need to copy the Variables too " ? Could you please show an Example?
Re: Guys, I want to add something more on the Registeration thing please help -
XePloiT - 17.11.2010
go to the pawn file you took the code from and look for each of the variables and copy them too...
Re: Guys, I want to add something more on the Registeration thing please help -
Ehab1911 - 17.11.2010
I don't get you .. What do you mean by Variables?
Re: Guys, I want to add something more on the Registeration thing please help -
Scenario - 17.11.2010
I believe you are missing a bracket (these { }) somewhere in your code. Did you take the steps you added to your registration system from a different script?
Re: Guys, I want to add something more on the Registeration thing please help -
Ehab1911 - 17.11.2010
Nope, from the same one