String Help - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: String Help (
/showthread.php?tid=219961)
String Help -
dillo1000 - 02.02.2011
pawn Код:
public OnPlayerConnect(playerid)
{
Line 18---- format(string, sizeof(string), "* %s has joined the server.", pname);
SendClientMessageToAll(0xAAAAAAAA, string);
return 1;
}
Код:
C:\Documents and Settings\Mikeeey\Desktop\GTA SA TEST\gamemodes\bare.pwn(18) : error 017: undefined symbol "string"
C:\Documents and Settings\Mikeeey\Desktop\GTA SA TEST\gamemodes\bare.pwn(18) : error 017: undefined symbol "string"
C:\Documents and Settings\Mikeeey\Desktop\GTA SA TEST\gamemodes\bare.pwn(18) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Mikeeey\Desktop\GTA SA TEST\gamemodes\bare.pwn(18) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
4 Errors.
Re: String Help -
admantis - 02.02.2011
add this
above format line
EDIT:
Add this
pawn Код:
public OnPlayerConnect(playerid)
{
new string[128], name[28];
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string), "* %s has joined the server.", pname);
SendClientMessageToAll(0xAAAAAAAA, string);
return 1;
}
Re: String Help -
dillo1000 - 02.02.2011
Thanks knew I forgot something
Re: String Help -
admantis - 02.02.2011
I've updated the script, refresh if you haven't.
Re: String Help -
dillo1000 - 02.02.2011
Thanks mate
Re: String Help - [L3th4l] - 02.02.2011
pawn Код:
stock pName(iPlayer)
{
new
iName[MAX_PLAYER_NAME];
GetPlayerName(iPlayer, iName, sizeof(iName));
return iName;
}
public OnPlayerConnect(playerid)
{
new
iStr[60];
format(iStr, sizeof(iStr), "* %s has joined the server.", pName(playerid));
SendClientMessage(playerid, 0xAAAAAAA, iStr);
return 1;
}