Posts: 8
Threads: 2
Joined: Aug 2012
Reputation:
0
C:\Users\LinJun\Desktop\GTA - San Andreas\LSCNR\gamemodes\1.1.1.pwn(1539) : error 017: undefined symbol "PlayerName"
C:\Users\LinJun\Desktop\GTA - San Andreas\LSCNR\gamemodes\1.1.1.pwn(1539) : error 001: expected token: ")", but found ";"
C:\Users\LinJun\Desktop\GTA - San Andreas\LSCNR\gamemodes\1.1.1.pwn(1539) : error 036: empty statement
C:\Users\LinJun\Desktop\GTA - San Andreas\LSCNR\gamemodes\1.1.1.pwn(1539) : fatal error 107: too many error messages on one line
i was adding in multi parameter for /givemoney cmd, but after adding in, they gave me this error. there wasn't any error before i add multi parameter in. NEED HELP!
Posts: 8
Threads: 2
Joined: Aug 2012
Reputation:
0
the things that are on line 1539 : if(!udb_Exists(PlayerName(playerid));
Posts: 8
Threads: 2
Joined: Aug 2012
Reputation:
0
stock PlayerName(playerid) {
new name[255];
GetPlayerName(playerid, name, 255);
return name;
}
i had this in my script but after i overwriting yours over what i had, it still give me the same error.
C:\Users\LinJun\Desktop\GTA - San Andreas\LSCNR\gamemodes\1.1.1.pwn(1539) : error 017: undefined symbol "PlayerName"
C:\Users\LinJun\Desktop\GTA - San Andreas\LSCNR\gamemodes\1.1.1.pwn(1539) : error 001: expected token: ")", but found ";"
C:\Users\LinJun\Desktop\GTA - San Andreas\LSCNR\gamemodes\1.1.1.pwn(1539) : error 036: empty statement
C:\Users\LinJun\Desktop\GTA - San Andreas\LSCNR\gamemodes\1.1.1.pwn(1539) : fatal error 107: too many error messages on one line
Posts: 407
Threads: 59
Joined: Jan 2012
Reputation:
0
can you show us a part of the code?; including the defines that it has
Posts: 8
Threads: 2
Joined: Aug 2012
Reputation:
0
this is from line 1539 on wards
if(!udb_Exists(PlayerName(playerid));
{
SendClientMessage(playerid, COLOR_ERROR, "This player name is taken. Please login.");
ShowLoginScreen(playerid);
}
else if(!udb_ExistsPlayerName(playerid));
{
SendClientMessage(playerid, COLOR_ERROR, "This player name is not registered. Please do so before you spawn.");
ShowRegisterScreen(playerid);
}
for(new i = 0; i < sizeof(Objects); i++) Player[playerid][view][i] = false; /////////xobj
return 1;
this is the multi parameter i added
new idx;
new cmd[256];
cmd = strtok(cmdtext, idx);
if(strcmp(cmd, "/givemoney", true) == 0) {
new tmp[256], tmp2[256];
tmp = strtok(cmdtext, idx);
tmp2 = strtok(cmdtext, idx);
if(!strlen(tmp)} {
SendClientMessage(playerid, COLOR_YELLOW, "Usage: /givemoney [playerid] [amount]");
return 1;
}
if(!strlen(tmp)} {
SendClientMessage(playerid, COLOR_YELLOW, "Usage: /givemoney [playerid] [amount]");
return 1;
}
new receiver, money;
receiver = strval(tmp);
money = strval(tmp2);
if(GetPlayerMoney(playerid) < money){
SendClientMessage(playerid, COLOR_YELLOW, "The amount you typed in is higher than the amount you have.");
return 1;
}
new string[128];
new playername[MAX_PLAYER_NAME];
GetPlayerName(playerid, playername, sizeof(playername));
new playername2[MAX_PLAYER_NAME];
GetPlayerName(receiver, playername, sizeof(playername2));
format(string, sizeof(string), "You received $%d from %s.", money, playername);
SendClientMessage(playerid, COLOR_YELLOW, string);
format(string, sizeof(string), "You gave $%d to %s.", money, playername2);
SendClientMessage(playerid, COLOR_YELLOW, string);
GivePlayerMoney(playerid, (0 - money));
GivePlayerMoney(receiver, money);
return 1;
Posts: 407
Threads: 59
Joined: Jan 2012
Reputation:
0
if you don't mind please re-phrase your code between "[ p a w n ] your-code [/pawn]" << make it [pawn]