Errors in my tutorial edit. -
Joshswag - 14.08.2013
Hello,
Today I'm editing my tutorial, and I've got a weird error.
Basically, throughout the tutorial it will give you the option on where you want to spawn. On the dialog response, I added something like
Код:
PlayerInfo[playerid][pAirport] = 1;
PlayerInfo[playerid][pGanton] = 1;
PlayerInfo[playerid][pPsquare] = 1;
So that I can create a message at a later date.
This is what the dialog response code looks like.
Код:
if(dialogid == SPAWNLIST)
{
if(response)
{
if(listitem == 0)
{
SetPlayerPos(playerid, 1.71875, 30.4062, 1200.34);
SetPlayerInterior(playerid,0);
RegistrationStep[playerid] = 2;
PlayerInfo[playerid][pAirport] = 1;
PlayerInfo[playerid][pGanton] = 0;
PlayerInfo[playerid][pPsquare] = 0;
ShowPlayerDialog(playerid, AGEMENU, DIALOG_STYLE_INPUT, "{FF9900}Character Information", "{FFFFFF}How old are you?", "Submit", "Cancel");
}
if(listitem == 1)
{
SetPlayerPos(playerid, 1.71875, 30.4062, 1200.34);
SetPlayerInterior(playerid,0);
RegistrationStep[playerid] = 2;
PlayerInfo[playerid][pGanton] = 1;
PlayerInfo[playerid][pAirport] = 0;
PlayerInfo[playerid][pPsquare] = 0;
ShowPlayerDialog(playerid, AGEMENU, DIALOG_STYLE_INPUT, "{FF9900}Character Information", "{FFFFFF}How old are you?", "Submit", "Cancel");
}
if(listitem == 2)
{
SetPlayerPos(playerid, 1.71875, 30.4062, 1200.34);
SetPlayerInterior(playerid,0);
RegistrationStep[playerid] = 2;
PlayerInfo[playerid][pGanton] = 0;
PlayerInfo[playerid][pPsquare] = 1;
PlayerInfo[playerid][pAirport] = 0;
ShowPlayerDialog(playerid, AGEMENU, DIALOG_STYLE_INPUT, "{FF9900}Character Information", "{FFFFFF}How old are you?", "Submit", "Cancel");
}
}
}
I added this under my pInfo enum.
Код:
pGanton
pPsquare
pAirport
Here are the errors.
Код:
C:\Users\Josh\Desktop\Server Development\gamemodes\Server.pwn(5270) : error 001: expected token: "}", but found "-identifier-"
C:\Users\Josh\Desktop\Server Development\gamemodes\Server.pwn(5272) : error 010: invalid function or declaration
C:\Users\Josh\Desktop\Server Development\gamemodes\Server.pwn(17015) : error 017: undefined symbol "pGanton"
C:\Users\Josh\Desktop\Server Development\gamemodes\Server.pwn(17016) : error 017: undefined symbol "pPsquare"
C:\Users\Josh\Desktop\Server Development\gamemodes\Server.pwn(17024) : error 017: undefined symbol "pGanton"
C:\Users\Josh\Desktop\Server Development\gamemodes\Server.pwn(17026) : error 017: undefined symbol "pPsquare"
C:\Users\Josh\Desktop\Server Development\gamemodes\Server.pwn(17034) : error 017: undefined symbol "pGanton"
C:\Users\Josh\Desktop\Server Development\gamemodes\Server.pwn(17035) : error 017: undefined symbol "pPsquare"
Re: Errors in my tutorial edit. -
Stefand - 14.08.2013
You have a } missing, look over the code. that will fix all errors
Re: Errors in my tutorial edit. -
PT - 14.08.2013
if still have errors send to us, the lines and the errors
pawn Код:
if(dialogid == SPAWNLIST)
{
if(response)
{
if(listitem == 0)
{
SetPlayerPos(playerid, 1.71875, 30.4062, 1200.34);
SetPlayerInterior(playerid,0);
RegistrationStep[playerid] = 2;
PlayerInfo[playerid][pAirport] = 1;
PlayerInfo[playerid][pGanton] = 0;
PlayerInfo[playerid][pPsquare] = 0;
ShowPlayerDialog(playerid, AGEMENU, DIALOG_STYLE_INPUT, "{FF9900}Character Information", "{FFFFFF}How old are you?", "Submit", "Cancel");
}
if(listitem == 1)
{
SetPlayerPos(playerid, 1.71875, 30.4062, 1200.34);
SetPlayerInterior(playerid,0);
RegistrationStep[playerid] = 2;
PlayerInfo[playerid][pGanton] = 1;
PlayerInfo[playerid][pAirport] = 0;
PlayerInfo[playerid][pPsquare] = 0;
ShowPlayerDialog(playerid, AGEMENU, DIALOG_STYLE_INPUT, "{FF9900}Character Information", "{FFFFFF}How old are you?", "Submit", "Cancel");
}
if(listitem == 2)
{
SetPlayerPos(playerid, 1.71875, 30.4062, 1200.34);
SetPlayerInterior(playerid,0);
RegistrationStep[playerid] = 2;
PlayerInfo[playerid][pGanton] = 0;
PlayerInfo[playerid][pPsquare] = 1;
PlayerInfo[playerid][pAirport] = 0;
ShowPlayerDialog(playerid, AGEMENU, DIALOG_STYLE_INPUT, "{FF9900}Character Information", "{FFFFFF}How old are you?", "Submit", "Cancel");
}
}
}
Re: Errors in my tutorial edit. -
Joshswag - 14.08.2013
I cant seem to find one in that piece of code, are you sure that's the issue?
Re: Errors in my tutorial edit. -
tyler12 - 14.08.2013
pGanton
pPsquare
pAirport
You've forgot commas ( , )
pGanton,
pPsquare,
pAirport