Help Dialog Rep +1 -
RoleplayEditor - 19.03.2012
Well i tried making a stats for my server but it gives error could you make me one or fix this one ? Please
pawn Код:
stock ShowStats(playerid,targetid)
{
if(IsPlayerConnected(playerid)&&IsPlayerConnected(targetid))
{
if(Player[playerid][AdminLevel] >= Player[id][AdminLevel])
{
new string[128], GroupString[128], phonestring[128], JobString[128], deg1[128], deg2[128], deg3[128], deg4[128], deg5[128];
if(Player[id][PhoneN] == -1)
{
format(phonestring, sizeof(phonestring), "Phone Number: None");
}
else
{
format(phonestring, sizeof(phonestring), "Phone Number: %d", Player[id][PhoneN]);
}
if(Player[id][Job] >= 1)
{
format(JobString, sizeof(JobString), "%s", Jobs[Player[id][Job]]);
}
else
{
format(JobString, sizeof(JobString), "Unemployed");
}
if(Player[id][Group] >= 1)
{
format(GroupString, sizeof(GroupString), "%s", Groups[Player[id][Group]][GroupName]);
}
else
{
format(GroupString, sizeof(GroupString), "None");
}
if(Player[id][CollegeMedia] >= 1)
{
format(deg1, sizeof(deg1), "Qualified");
}
else
{
format(deg1, sizeof(deg1), "UnQualified");
}
if(Player[id][CollegeLaw] >= 1)
{
format(deg2, sizeof(deg2), "Qualified");
}
else
{
format(deg2, sizeof(deg2), "UnQualified");
}
if(Player[id][CollegeEng] >= 1)
{
format(deg3, sizeof(deg3), "Qualified");
}
else
{
format(deg3, sizeof(deg3), "UnQualified");
}
if(Player[id][CollegeMath] >= 1)
{
format(deg4, sizeof(deg4), "Qualified");
}
else
{
format(deg4, sizeof(deg4), "UnQualified");
}
if(Player[id][CollegeChem] >= 1)
{
format(deg5, sizeof(deg5), "Qualified");
}
else
{
format(deg5, sizeof(deg5), "UnQualified");
}
format(coordstring,sizeof(coordstring),"{33CCFF}format(string, sizeof(string), "Here are your statistics: %s [IP: %s]", RemoveUnderScore(id), IPString);
format(coordsstring, sizeof(coordsstring),"{33CCFF}[OOC info]{FFFFFF}Player name: %s\n",GetPlayerNameEx(targetid));
strcat(catstr, coordsstring, sizeof(coordsstring));
format(coordsstring, sizeof(coordsstring), "{33CCFF}[OOC info]{FFFFFF}Money: $%s | Seconds Connected: %d]\n",IntToFormattedStr(Player[id][Money]), Player[id][SecondsLoggedIn]);
strcat(catstr, coordsstring, sizeof(coordsstring));
format(coordsstring, sizeof(coordsstring), "{33CCFF}[Character]{FFFFFF} Experience points: %i | Level: %i Recorded Crimes: %d \n", Player[id][Exp], Player[id][Level], Player[id][CriminalOffences]);
strcat(catstr, coordsstring, sizeof(coordsstring));
ShowPlayerDialog(playerid, 5133, DIALOG_STYLE_MSGBOX, "{33CCFF}Red Country Stastics", catstr, "Close", "");
}
return 1;
}
In hope of your replies !
Please don't tell to use search or give me link.
I did tried them but fail.
Please help me !
Re: Help Dialog Rep +1 -
Georgi166 - 19.03.2012
Whats the error?
Re: Help Dialog Rep +1 -
RoleplayEditor - 19.03.2012
Well too many..
You could put this in your pawn and see by yourself..
I am not saying it because..the errors are not coming in related to it
And when i remove this it compile fine >.<
If you still need the errors tell me
Re: Help Dialog Rep +1 -
Georgi166 - 19.03.2012
Errors are the most important thing.We cant help you without knowing the problem...
Re: Help Dialog Rep +1 -
RoleplayEditor - 19.03.2012
As i said.
The errors which come are not related to the topic...Anyway here.
pawn Код:
C:\Documents and Settings\GOD\Desktop\lolrp\gamemodes\rc-rp.pwn(75) : error 017: undefined symbol "RemoveUnderScore"
C:\Documents and Settings\GOD\Desktop\lolrp\gamemodes\rc-rp.pwn(1747) : error 017: undefined symbol "LoadCameras"
C:\Documents and Settings\GOD\Desktop\lolrp\gamemodes\rc-rp.pwn(1769) : error 004: function "UpdateTime" is not implemented
C:\Documents and Settings\GOD\Desktop\lolrp\gamemodes\rc-rp.pwn(1791) : error 017: undefined symbol "InitVehicles"
C:\Documents and Settings\GOD\Desktop\lolrp\gamemodes\rc-rp.pwn(3102) : error 017: undefined symbol "IsPlayerConnectedEx"
C:\Documents and Settings\GOD\Desktop\lolrp\gamemodes\rc-rp.pwn(3682) : error 017: undefined symbol "IsPlayerConnectedEx"
C:\Documents and Settings\GOD\Desktop\lolrp\gamemodes\rc-rp.pwn(4361) : error 017: undefined symbol "IsPlayerConnectedEx"
C:\Documents and Settings\GOD\Desktop\lolrp\gamemodes\rc-rp.pwn(4992) : error 017: undefined symbol "IsPlayerConnectedEx"
C:\Documents and Settings\GOD\Desktop\lolrp\gamemodes\rc-rp.pwn(5656) : error 017: undefined symbol "RemoveUnderScore"
C:\Documents and Settings\GOD\Desktop\lolrp\gamemodes\rc-rp.pwn(5660) : error 017: undefined symbol "RemoveUnderScore"
C:\Documents and Settings\GOD\Desktop\lolrp\gamemodes\rc-rp.pwn(5664) : error 017: undefined symbol "RemoveUnderScore"
C:\Documents and Settings\GOD\Desktop\lolrp\gamemodes\rc-rp.pwn(5851) : error 017: undefined symbol "RemoveUnderScore"
C:\Documents and Settings\GOD\Desktop\lolrp\gamemodes\rc-rp.pwn(5929) : error 017: undefined symbol "RemoveUnderScore"
C:\Documents and Settings\GOD\Desktop\lolrp\gamemodes\rc-rp.pwn(5938) : error 017: undefined symbol "RemoveUnderScore"
C:\Documents and Settings\GOD\Desktop\lolrp\gamemodes\rc-rp.pwn(6096) : error 017: undefined symbol "IsPlayerConnectedEx"
C:\Documents and Settings\GOD\Desktop\lolrp\gamemodes\rc-rp.pwn(6109) : error 017: undefined symbol "SaveGroups"
C:\Documents and Settings\GOD\Desktop\lolrp\gamemodes\rc-rp.pwn(6110) : error 017: undefined symbol "SaveJobs"
C:\Documents and Settings\GOD\Desktop\lolrp\gamemodes\rc-rp.pwn(6111) : error 017: undefined symbol "SaveHouses"
C:\Documents and Settings\GOD\Desktop\lolrp\gamemodes\rc-rp.pwn(6113) : error 017: undefined symbol "SaveBusinesses"
C:\Documents and Settings\GOD\Desktop\lolrp\gamemodes\rc-rp.pwn(6162) : error 017: undefined symbol "RemoveUnderScore"
C:\Documents and Settings\GOD\Desktop\lolrp\gamemodes\rc-rp.pwn(6420) : error 017: undefined symbol "RemoveUnderScore"
C:\Documents and Settings\GOD\Desktop\lolrp\gamemodes\rc-rp.pwn(6441) : error 017: undefined symbol "RemoveUnderScore"
C:\Documents and Settings\GOD\Desktop\lolrp\gamemodes\rc-rp.pwn(6465) : error 017: undefined symbol "RemoveUnderScore"
C:\Documents and Settings\GOD\Desktop\lolrp\gamemodes\rc-rp.pwn(6489) : error 017: undefined symbol "RemoveUnderScore"
C:\Documents and Settings\GOD\Desktop\lolrp\gamemodes\rc-rp.pwn(6600) : error 017: undefined symbol "RemoveUnderScore"
C:\Documents and Settings\GOD\Desktop\lolrp\gamemodes\rc-rp.pwn(6613) : error 017: undefined symbol "RemoveUnderScore"
Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
26 Errors.
After i put this code.
before putting it ,it compiles fine.
pawn Код:
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
So ?
Re: Help Dialog Rep +1 -
Georgi166 - 19.03.2012
You cant use symbols that Pawno dont got in it.
You have to define them first.
Re: Help Dialog Rep +1 -
RoleplayEditor - 19.03.2012
Well those symbals are already defined.
As i said..Before using that code..everything works fine but when i put it [ofc i used my defined parts to create a stats ..]
The errors come.
Mind making one Dialog or fixing mine ?
Re: Help Dialog Rep +1 -
RoleplayEditor - 19.03.2012
Anyone ?
Re: Help Dialog Rep +1 -
rati555 - 19.03.2012
pawn Код:
stock ShowStats(playerid,targetid)
{
if(IsPlayerConnected(playerid)&&IsPlayerConnected(targetid))
{
if(Player[playerid][AdminLevel] >= Player[id][AdminLevel])
{
new string[128], GroupString[128], phonestring[128], JobString[128], deg1[128], deg2[128], deg3[128], deg4[128], deg5[128];
if(Player[id][PhoneN] == -1)
{
format(phonestring, sizeof(phonestring), "Phone Number: None");
}
else
{
format(phonestring, sizeof(phonestring), "Phone Number: %d", Player[id][PhoneN]);
}
if(Player[id][Job] >= 1)
{
format(JobString, sizeof(JobString), "%s", Jobs[Player[id][Job]]);
}
else
{
format(JobString, sizeof(JobString), "Unemployed");
}
if(Player[id][Group] >= 1)
{
format(GroupString, sizeof(GroupString), "%s", Groups[Player[id][Group]][GroupName]);
}
else
{
format(GroupString, sizeof(GroupString), "None");
}
if(Player[id][CollegeMedia] >= 1)
{
format(deg1, sizeof(deg1), "Qualified");
}
else
{
format(deg1, sizeof(deg1), "UnQualified");
}
if(Player[id][CollegeLaw] >= 1)
{
format(deg2, sizeof(deg2), "Qualified");
}
else
{
format(deg2, sizeof(deg2), "UnQualified");
}
if(Player[id][CollegeEng] >= 1)
{
format(deg3, sizeof(deg3), "Qualified");
}
else
{
format(deg3, sizeof(deg3), "UnQualified");
}
if(Player[id][CollegeMath] >= 1)
{
format(deg4, sizeof(deg4), "Qualified");
}
else
{
format(deg4, sizeof(deg4), "UnQualified");
}
if(Player[id][CollegeChem] >= 1)
{
format(deg5, sizeof(deg5), "Qualified");
}
else
{
format(deg5, sizeof(deg5), "UnQualified");
}
format(coordstring,sizeof(coordstring),"{33CCFF}format(string, sizeof(string), "Here are your statistics: %s [IP: %s]", RemoveUnderScore(id), IPString);
format(coordsstring, sizeof(coordsstring),"{33CCFF}[OOC info]{FFFFFF}Player name: %s\n",GetPlayerNameEx(targetid));
strcat(catstr, coordsstring, sizeof(coordsstring));
format(coordsstring, sizeof(coordsstring), "{33CCFF}[OOC info]{FFFFFF}Money: $%s | Seconds Connected: %d]\n",IntToFormattedStr(Player[id][Money]), Player[id][SecondsLoggedIn]);
strcat(catstr, coordsstring, sizeof(coordsstring));
format(coordsstring, sizeof(coordsstring), "{33CCFF}[Character]{FFFFFF} Experience points: %i | Level: %i Recorded Crimes: %d \n", Player[id][Exp], Player[id][Level], Player[id][CriminalOffences]);
strcat(catstr, coordsstring, sizeof(coordsstring));
ShowPlayerDialog(playerid, 5133, DIALOG_STYLE_MSGBOX, "{33CCFF}Red Country Stastics", catstr, "Close", "");
}
} // missing bracket
return 1;
}
Re: Help Dialog Rep +1 -
Roel - 19.03.2012
Код:
forward ShowStats(playerid,targetid);
public ShowStats(playerid,targetid)
{
if(IsPlayerConnected(playerid) && IsPlayerConnected(targetid))
{
if(Player[playerid][AdminLevel] >= Player[id][AdminLevel])
{
new string[128], GroupString[128], phonestring[128], JobString[128], deg1[128], deg2[128], deg3[128], deg4[128], deg5[128];
if(Player[id][PhoneN] == -1)
{
format(phonestring, sizeof(phonestring), "Phone Number: None");
}
else
{
format(phonestring, sizeof(phonestring), "Phone Number: %d", Player[id][PhoneN]);
}
if(Player[id][Job] >= 1)
{
format(JobString, sizeof(JobString), "%s", Jobs[Player[id][Job]]);
}
else
{
format(JobString, sizeof(JobString), "Unemployed");
}
if(Player[id][Group] >= 1)
{
format(GroupString, sizeof(GroupString), "%s", Groups[Player[id][Group]][GroupName]);
}
else
{
format(GroupString, sizeof(GroupString), "None");
}
if(Player[id][CollegeMedia] >= 1)
{
format(deg1, sizeof(deg1), "Qualified");
}
else
{
format(deg1, sizeof(deg1), "UnQualified");
}
if(Player[id][CollegeLaw] >= 1)
{
format(deg2, sizeof(deg2), "Qualified");
}
else
{
format(deg2, sizeof(deg2), "UnQualified");
}
if(Player[id][CollegeEng] >= 1)
{
format(deg3, sizeof(deg3), "Qualified");
}
else
{
format(deg3, sizeof(deg3), "UnQualified");
}
if(Player[id][CollegeMath] >= 1)
{
format(deg4, sizeof(deg4), "Qualified");
}
else
{
format(deg4, sizeof(deg4), "UnQualified");
}
if(Player[id][CollegeChem] >= 1)
{
format(deg5, sizeof(deg5), "Qualified");
}
else
{
format(deg5, sizeof(deg5), "UnQualified");
}
format(coordstring,sizeof(coordstring),"{33CCFF}format(string, sizeof(string), "Here are your statistics: %s [IP: %s]", RemoveUnderScore(id), IPString);
format(coordsstring, sizeof(coordsstring),"{33CCFF}[OOC info]{FFFFFF}Player name: %s\n",GetPlayerNameEx(targetid));
strcat(catstr, coordsstring, sizeof(coordsstring));
format(coordsstring, sizeof(coordsstring), "{33CCFF}[OOC info]{FFFFFF}Money: $%s | Seconds Connected: %d]\n",IntToFormattedStr(Player[id][Money]), Player[id][SecondsLoggedIn]);
strcat(catstr, coordsstring, sizeof(coordsstring));
format(coordsstring, sizeof(coordsstring), "{33CCFF}[Character]{FFFFFF} Experience points: %i | Level: %i Recorded Crimes: %d \n", Player[id][Exp], Player[id][Level], Player[id][CriminalOffences]);
strcat(catstr, coordsstring, sizeof(coordsstring));
ShowPlayerDialog(playerid, 5133, DIALOG_STYLE_MSGBOX, "{33CCFF}Red Country Stastics", catstr, "Close", "");
}
}
return 1;
}
ow, nvm I was too late again.