public OnPlayerDisconnect(playerid, reason)
{
if(pLogged[playerid] == 1) {
new INI:iFile = INI_Open(PlayerPath(playerid));
INI_SetTag(iFile,"data");
INI_WriteInt(iFile,"Cash",GetPlayerMoney(playerid));
INI_WriteInt(iFile,"Score",GetPlayerScore(playerid));
INI_Close(iFile);
}
pLogged[playerid] = 0;
TextDrawHideForPlayer(playerid, TextdrawConnect0); // Connect Textdraw
TextDrawHideForPlayer(playerid, TextdrawConnect1); // Connect Textdraw
TextDrawHideForPlayer(playerid, TextdrawConnect2); // Connect Textdraw
TextDrawHideForPlayer(playerid, TextdrawConnect3); // Connect Textdraw
TextDrawHideForPlayer(playerid, TextdrawConnect4); // Connect Textdraw
TextDrawHideForPlayer(playerid, TextdrawConnect5); // Connect Textdraw
TextDrawHideForPlayer(playerid, TextdrawConnect6); // Connect Textdraw
TextDrawHideForPlayer(playerid, TextdrawConnect7); // Connect Textdraw
TextDrawHideForPlayer(playerid, TextdrawConnect8); // Connect Textdraw
TextDrawHideForPlayer(playerid, TextdrawConnect9); // Connect Textdraw
TextDrawHideForPlayer(playerid, TextdrawConnect10); // Connect Textdraw
TextDrawHideForPlayer(playerid, TextdrawConnect11); // Connect Textdraw
TextDrawHideForPlayer(playerid, TextdrawConnect12); // Connect Textdraw
TextDrawHideForPlayer(playerid, TextdrawConnect13); // Connect Textdraw
TextDrawHideForPlayer(playerid, TextdrawConnect14); // Connect Textdraw
TextDrawHideForPlayer(playerid, TextdrawConnect15); // Connect Textdraw
TextDrawHideForPlayer(playerid, TextdrawConnect16); // Connect Textdraw
TextDrawHideForPlayer(playerid, TextdrawConnect17); // Connect Textdraw
TextDrawHideForPlayer(playerid, TextdrawConnect18); // Connect Textdraw
TextDrawHideForPlayer(playerid, TextdrawConnect19); // Connect Textdraw
TextDrawHideForPlayer(playerid, Time1), TextDrawHideForPlayer(playerid, Date); // DATE AND TIME
TextDrawHideForPlayer(playerid, Credit); // Credits
StopAudioStreamForPlayer(playerid);
Radio[playerid] = false;
return 1;
}
return 0;
}
(781) : error 029: invalid expression, assumed zero
(781) : error 004: function "S@@_OnPlayerDisconnect" is not implemented
public OnPlayerDisconnect(playerid, reason)
{
if(pLogged[playerid] == 1) {
new INI:iFile = INI_Open(PlayerPath(playerid));
INI_SetTag(iFile,"data");
INI_WriteInt(iFile,"Cash",GetPlayerMoney(playerid));
INI_WriteInt(iFile,"Score",GetPlayerScore(playerid));
INI_Close(iFile);
}
pLogged[playerid] = 0;
TextDrawHideForPlayer(playerid, TextdrawConnect0); // Connect Textdraw
TextDrawHideForPlayer(playerid, TextdrawConnect1); // Connect Textdraw
TextDrawHideForPlayer(playerid, TextdrawConnect2); // Connect Textdraw
TextDrawHideForPlayer(playerid, TextdrawConnect3); // Connect Textdraw
TextDrawHideForPlayer(playerid, TextdrawConnect4); // Connect Textdraw
TextDrawHideForPlayer(playerid, TextdrawConnect5); // Connect Textdraw
TextDrawHideForPlayer(playerid, TextdrawConnect6); // Connect Textdraw
TextDrawHideForPlayer(playerid, TextdrawConnect7); // Connect Textdraw
TextDrawHideForPlayer(playerid, TextdrawConnect8); // Connect Textdraw
TextDrawHideForPlayer(playerid, TextdrawConnect9); // Connect Textdraw
TextDrawHideForPlayer(playerid, TextdrawConnect10); // Connect Textdraw
TextDrawHideForPlayer(playerid, TextdrawConnect11); // Connect Textdraw
TextDrawHideForPlayer(playerid, TextdrawConnect12); // Connect Textdraw
TextDrawHideForPlayer(playerid, TextdrawConnect13); // Connect Textdraw
TextDrawHideForPlayer(playerid, TextdrawConnect14); // Connect Textdraw
TextDrawHideForPlayer(playerid, TextdrawConnect15); // Connect Textdraw
TextDrawHideForPlayer(playerid, TextdrawConnect16); // Connect Textdraw
TextDrawHideForPlayer(playerid, TextdrawConnect17); // Connect Textdraw
TextDrawHideForPlayer(playerid, TextdrawConnect18); // Connect Textdraw
TextDrawHideForPlayer(playerid, TextdrawConnect19); // Connect Textdraw
TextDrawHideForPlayer(playerid, Time1), TextDrawHideForPlayer(playerid, Date); // DATE AND TIME
TextDrawHideForPlayer(playerid, Credit); // Credits
TextDrawHideForPlayer(playerid,PlayerN);// Player Name Textdraw
StopAudioStreamForPlayer(playerid);
Radio[playerid] = false;
return 1;
}
}
public OnPlayerDisconnect(playerid, reason)
{
if(pLogged[playerid] == 1) {
new INI:iFile = INI_Open(PlayerPath(playerid));
INI_SetTag(iFile,"data");
INI_WriteInt(iFile,"Cash",GetPlayerMoney(playerid));
INI_WriteInt(iFile,"Score",GetPlayerScore(playerid));
INI_Close(iFile);
}
{
pLogged[playerid] = 0;
TextDrawHideForPlayer(playerid, TextdrawConnect0); // Connect Textdraw
TextDrawHideForPlayer(playerid, TextdrawConnect1); // Connect Textdraw
TextDrawHideForPlayer(playerid, TextdrawConnect2); // Connect Textdraw
TextDrawHideForPlayer(playerid, TextdrawConnect3); // Connect Textdraw
TextDrawHideForPlayer(playerid, TextdrawConnect4); // Connect Textdraw
TextDrawHideForPlayer(playerid, TextdrawConnect5); // Connect Textdraw
TextDrawHideForPlayer(playerid, TextdrawConnect6); // Connect Textdraw
TextDrawHideForPlayer(playerid, TextdrawConnect7); // Connect Textdraw
TextDrawHideForPlayer(playerid, TextdrawConnect8); // Connect Textdraw
TextDrawHideForPlayer(playerid, TextdrawConnect9); // Connect Textdraw
TextDrawHideForPlayer(playerid, TextdrawConnect10); // Connect Textdraw
TextDrawHideForPlayer(playerid, TextdrawConnect11); // Connect Textdraw
TextDrawHideForPlayer(playerid, TextdrawConnect12); // Connect Textdraw
TextDrawHideForPlayer(playerid, TextdrawConnect13); // Connect Textdraw
TextDrawHideForPlayer(playerid, TextdrawConnect14); // Connect Textdraw
TextDrawHideForPlayer(playerid, TextdrawConnect15); // Connect Textdraw
TextDrawHideForPlayer(playerid, TextdrawConnect16); // Connect Textdraw
TextDrawHideForPlayer(playerid, TextdrawConnect17); // Connect Textdraw
TextDrawHideForPlayer(playerid, TextdrawConnect18); // Connect Textdraw
TextDrawHideForPlayer(playerid, TextdrawConnect19); // Connect Textdraw
TextDrawHideForPlayer(playerid, Time1), TextDrawHideForPlayer(playerid, Date); // DATE AND TIME
TextDrawHideForPlayer(playerid, Credit); // Credits
StopAudioStreamForPlayer(playerid);
Radio[playerid] = false;
return 1;
}
return 0;
}
i mean like this
PHP Code:
|
public OnPlayerDisconnect(playerid, reason)
{
if(pLogged[playerid] == 1)
{
new INI:iFile = INI_Open(PlayerPath(playerid));
INI_SetTag(iFile,"data");
INI_WriteInt(iFile,"Cash",GetPlayerMoney(playerid));
INI_WriteInt(iFile,"Score",GetPlayerScore(playerid));
INI_Close(iFile);
}
pLogged[playerid] = 0;
TextDrawHideForPlayer(playerid, TextdrawConnect0);
TextDrawHideForPlayer(playerid, TextdrawConnect1);
TextDrawHideForPlayer(playerid, TextdrawConnect2);
TextDrawHideForPlayer(playerid, TextdrawConnect3);
TextDrawHideForPlayer(playerid, TextdrawConnect4);
TextDrawHideForPlayer(playerid, TextdrawConnect5);
TextDrawHideForPlayer(playerid, TextdrawConnect6);
TextDrawHideForPlayer(playerid, TextdrawConnect7);
TextDrawHideForPlayer(playerid, TextdrawConnect8);
TextDrawHideForPlayer(playerid, TextdrawConnect9);
TextDrawHideForPlayer(playerid, TextdrawConnect10);
TextDrawHideForPlayer(playerid, TextdrawConnect11);
TextDrawHideForPlayer(playerid, TextdrawConnect12);
TextDrawHideForPlayer(playerid, TextdrawConnect13);
TextDrawHideForPlayer(playerid, TextdrawConnect14);
TextDrawHideForPlayer(playerid, TextdrawConnect15);
TextDrawHideForPlayer(playerid, TextdrawConnect16);
TextDrawHideForPlayer(playerid, TextdrawConnect17);
TextDrawHideForPlayer(playerid, TextdrawConnect18);
TextDrawHideForPlayer(playerid, TextdrawConnect19);
TextDrawHideForPlayer(playerid, Time1);
TextDrawHideForPlayer(playerid, Date); // DATE AND TIME
TextDrawHideForPlayer(playerid, Credit); // Credits
StopAudioStreamForPlayer(playerid); // I find this pointless
Radio[playerid] = false;
return 1;
}
pawn Code:
|
put these TextDrawHideForPlayer thing in OnPlayerGamemodeExit(playerid)
|
why would you do that, why you're trying to hide a player textdraw when the gamemode exits, instead just hide/destroy the textdraw.
|
put these TextDrawHideForPlayer thing in OnPlayerGamemodeExit(playerid)
|
Looks like a braces problem. Make sure all your code is correctly indented. Especially all the code before the current problem functions.
|
if(dialogid == DEIALOG_ID)
{
if(listitem == sizeof(radiolist)) return OnPlayerCommandText(playerid,"/radio");
if(listitem == sizeof(radiolist)+1) return StopAudioStreamForPlayer(playerid),Radio[playerid] = false;
StopAudioStreamForPlayer(playerid);
PlayAudioStreamForPlayer(playerid,radiolist[listitem][0]);
new str[50]; format(str,50,"Now listening to \"%s\"...",radiolist[listitem][1]);
SendClientMessage(playerid,0x33CCFFAA,str);
SendClientMessage(playerid,0xFFFFFFAA,"Stop listening: /MOFF");
Radio[playerid] = true;
return 1;
}
return 0;
}
(737) : warning 202: number of arguments does not match definition
format(string,sizeof(string),"\t"lyellow2"Hey,%s! Welcome to the help page of Europe Deathmatch!\n\nWe have several jobs in our server:\n* Trucker \n"lblue"* Police \n"lorange"* Assistance \n"lgreen"* Driver \n",GetPlayerName(playerid));
Pretty sure someone already answered that one in your other topic - look at how GetPlayerName is declared and compare that to how you are using it.
|
new string[1550];
new PlayerName[MAX_PLAYER_NAME];
GetPlayerName(playerid,PlayerName,sizeof(PlayerName));
#pragma unused params
(731) : error 017: undefined symbol "params"
So don't do that bit then! If the guide you read doesn't tell you WHY to do that (and more importantly when NOT to do that) I wouldn't call it a very good guide.
|
if(!strcmp(cmdtext, "/help",true))
{
// #pragma unused params
new string[1550];
new PlayerName[MAX_PLAYER_NAME];
GetPlayerName(playerid,PlayerName,sizeof(PlayerName));
format(string,sizeof(string),"\t"lyellow2"Hey,%s! Welcome to the help page of Europe Deathmatch!\n\nWe have several jobs in our server:\n* Trucker \n"lblue"* Police \n"lorange"* Assistance \n"lgreen"* Driver \n",GetPlayerName(playerid));
strcat(string,"Trucker is the most common job in this server: Just spawn, get a truck(van), attach a trailer and type /work! \nYou'll have to deliver different loads from different points to other. \nBy doing that you are gaining money and score, which can be used for buying your own vehicle, house, and more! \n");
strcat(string,""lblue"To be a police man you need at least 50 score, which can be earned by doing trucking missions. \nYou'll need to catch players breaking the rules, such as not following speed limits, robbing people etc. \nYou can first use /ticket to give them a ticket, or /arrest if they got a higher wanted level! \n");
strcat(string,""lorange"The assistance job is easy: just spawn as an assistance man, get in your tow truck and wait for help requests! \nYou can fix any vehicle by typing /fixcar, fill it up by typing /fuelcar, or press 2 to tow a vehicle while near one! \n");
strcat(string,""lgreen"By being a taxi driver, you should transport players to where you they want to. \nYou can type /fare while in a taxi to set up your fare, and wait for players! \nYou get paid every 10 seconds a passanger is in your vehicle if you are on duty. \n");
strcat(string,"\t"lred"Other:\n\n "lred"/phelp - "lyellow"Accurate help about your job! \n/credits - see the founders of Ultimate Trucking! \n/cmds - See the list of the available commands on the server! \n/rules - See the server rules!\n\n\t\t"lred"www.-.net");
ShowPlayerDialog(playerid,5555,0,""lyellow"GENERAL HELP",string,"OK","");
return 1;
}
You now have "GetPlayerName" twice - once done correctly and once done wrong, just use the first.
|
pawno\include\YSI\internal\y_dohooks.inc(2501) : warning 235: public function lacks forward declaration (symbol "OnVehicleDamageStatusUpdate")
pawno\include\YSI\internal\y_dohooks.inc(2566) : warning 235: public function lacks forward declaration (symbol "OnUnoccupiedVehicleUpdate")
pawno\include\YSI\internal\y_dohooks.inc(3426) : warning 235: public function lacks forward declaration (symbol "OnPlayerTakeDamage")
pawno\include\YSI\internal\y_dohooks.inc(3495) : warning 235: public function lacks forward declaration (symbol "OnPlayerGiveDamage")
You're not using the 0.3e includes. If you're not on 0.3e just ignore those warnings, it doesn't currently gracefully detect versions (which I admit it should).
|