PDA

View Full Version : Help with this!


RyanPetersons
20/05/2013, 07:43 AM
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
new file[26];
if(pInfo[playerid][ach2] == 0)
}
pInfo[playerid][ach2] = 1;
SendClientMessage(playerid,COLOR_GREEN,"You've successfully unlocked your acheivement 'First Vehicle', Congratulations!");
format(file, sizeof(file), "%s.ini", PlayerName(playerid));
dini_IntSet(file,"ach2",1);
}
return 1;
}
4 Errors for this!
C:\Documents and Settings\Rehan\My Documents\Downloads\samp03x_svr_R1-2_win32(1)\gamemodes\Untitled.pwn(196) : error 028: invalid subscript (not an array or too many subscripts): "pInfo"
C:\Documents and Settings\Rehan\My Documents\Downloads\samp03x_svr_R1-2_win32(1)\gamemodes\Untitled.pwn(196) : warning 215: expression has no effect
C:\Documents and Settings\Rehan\My Documents\Downloads\samp03x_svr_R1-2_win32(1)\gamemodes\Untitled.pwn(196) : error 001: expected token: ";", but found "]"
C:\Documents and Settings\Rehan\My Documents\Downloads\samp03x_svr_R1-2_win32(1)\gamemodes\Untitled.pwn(196) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Rehan\My Documents\Downloads\samp03x_svr_R1-2_win32(1)\gamemodes\Untitled.pwn(196) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase


4 Errors.


And for Dialog Response. same.

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
new str1[256];
if (dialogid == 2)
{
new name[MAX_PLAYER_NAME], file[256], string[128];
GetPlayerName(playerid, name, sizeof(name));
format(file, sizeof(file), SERVER_USER_FILE, name);
if(!response) return Kick(playerid);
if (!strlen(inputtext)) return
format(str1, 128, "{FFFFFF}Welcome to Ryans Clan's RolePlay/FreeRoam\n\n{DDCA22}Account:{FFFFFF} %s\n\nEnter A Password To Register This Account", name);
ShowPlayerDialog(playerid, 2, DIALOG_STYLE_PASSWORD, "Registration", str1, "Register", "");
dini_Create(file);
dini_IntSet(file, "Password", udb_hash(inputtext));
dini_IntSet(file, "AdminLevel",PlayerInfo[playerid][pAdminLevel] = 0);
dini_IntSet(file, "Money",PlayerInfo[playerid][pCash] = 500);
dini_IntSet(file, "Score",PlayerInfo[playerid][pScore] = 0);
dini_IntSet(file,"ach1",0);
dini_IntSet(file,"ach2",0);
dini_IntSet(file,"ach3",0);
format(string, 128, "You succesfully registered with password %s, You have been logged in.",inputtext);
SendClientMessage(playerid, COLOR_YELLOW, string);
gPlayerLogged[playerid] = 1;
}
if (dialogid == 3)
{
new file[160];
new name[MAX_PLAYER_NAME], file[256], string[128];
GetPlayerName(playerid, name, sizeof(name));
format(file, sizeof(file), SERVER_USER_FILE, name);
if(!response) return Kick(playerid);
if (!strlen(inputtext)) return ShowPlayerDialog(playerid, 2, DIALOG_STYLE_INPUT, "Hi your registered", "Fucken awesome mate, your registered :D. Inpute your pw below", "Login", "Leave");
new tmp;
tmp = dini_Int(file, "Password");
if(udb_hash(inputtext) != tmp) {
format(str1, 128, "{FFFFFF}Welcome to Rehans Clan's RolePlay/FreeRoam\n\n{DDCA22}Account:{FFFFFF} %s\n\nEnter A Password To Login This Account", name);
ShowPlayerDialog(playerid, 3, DIALOG_STYLE_PASSWORD, "Login", str1, "Register", "");
}
else
{
gPlayerLogged[playerid] = 1;
if(dini_Int(file, "ach1",1))
{
pInfo[playerid][ach1] = 1;
}
if(dini_Int(file, "ach2",1))
{
pInfo[playerid][ach2] = 1;
}
if(dini_Int(file, "ach3",1))
{
pInfo[playerid][ach3] = 1;
}
PlayerInfo[playerid][pAdminLevel] = dini_Int(file, "AdminLevel");
SetPlayerScore(playerid, PlayerInfo[playerid][pScore]);
GivePlayerMoney(playerid, dini_Int(file, "Money")-GetPlayerMoney(playerid));
SendClientMessage(playerid,COLOR_RED, "You'ad been Successfully logged in!");
}
}
if(dialogid == 4)
{
if(response)
{
}
if(!response)
{
}
}
return 1;
}

4 Errors.
C:\Documents and Settings\loool\My Documents\Downloads\samp03x_svr_R1-2_win32(1)\gamemodes\Untitled.pwn(362) : error 028: invalid subscript (not an array or too many subscripts): "pInfo"
C:\Documents and Settings\loool\My Documents\Downloads\samp03x_svr_R1-2_win32(1)\gamemodes\Untitled.pwn(362) : warning 215: expression has no effect
C:\Documents and Settings\loool\My Documents\Downloads\samp03x_svr_R1-2_win32(1)\gamemodes\Untitled.pwn(362) : error 001: expected token: ";", but found "]"
C:\Documents and Settings\lolool\My Documents\Downloads\samp03x_svr_R1-2_win32(1)\gamemodes\Untitled.pwn(362) : error 029: invalid expression, assumed zero
C:\Documents and Settings\loool\My Documents\Downloads\samp03x_svr_R1-2_win32(1)\gamemodes\Untitled.pwn(362) : fatal error 107: too many error messages on one line

RyanPetersons
20/05/2013, 07:47 AM
Fixed myself, Thanks.