SA-MP Forums Archive
little 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)
+--- Thread: little help (/showthread.php?tid=556703)



little help - SampAsia - 11.01.2015

Код HTML:
public OnPlayerConnect(playerid)
{   new pmess[256],IP[256], name[MAX_PLAYER_NAME];
 	GetPlayerName(playerid, name, sizeof(name));
    GetPlayerIp(playerid,IP,sizeof(IP));
    printf("%s has joined the server. Country: %s | IP Address: %s",name, GetPlayerCountryName(playerid),IP);
	format(pmess,sizeof(string), ""COL_RED"%s"COL_WHITE" has joined the server from "COL_RED"%s.", pName, GetPlayerCountryName(playerid));
    SendClientMessageToAll(-1, string);

    GameTextForPlayer(playerid, "~g~Welcome ~r~to ~p~Samp~y~Drifting ~b~Community", 5000, 6);
    return 1;
}
PHP код:
C:\Users\win7\Desktop\as.pwn(1822) : error 017undefined symbol "string"
C:\Users\win7\Desktop\as.pwn(1822) : error 029invalid expressionassumed zero
C
:\Users\win7\Desktop\as.pwn(1822) : warning 215expression has no effect
C
:\Users\win7\Desktop\as.pwn(1823) : error 017undefined symbol "string"
Pawn compiler 3.2.3664              Copyright (c1997-2006ITB CompuPhase
3 Errors




Re: little help - Ironboy - 11.01.2015

pawn Код:
new string[256];



Re: little help - lwilson - 11.01.2015

Код:
new string[256];
before the the string used

__________________
Next Life Roleplay [Refunding/Hiring]
SERVER IP: 172.245.220.133:7108
http://nextlife-rp.boards.net/



Re: little help - SampAsia - 11.01.2015

C:\Users\win7\Desktop\s.pwn(1819) : error 001: expected token: ";", but found "new"
C:\Users\win7\Desktop\s.pwn(1822) : error 017: undefined symbol "pName"
C:\Users\win7\Desktop\s.pwn(1823) : error 017: undefined symbol "pName"
C:\Users\win7\Desktop\s.pwn(1819) : warning 204: symbol is assigned a value that is never used: "pmess"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


3 Errors.


Re: little help - lwilson - 11.01.2015

CTRL + F then find "pmess" if you really don't need that you can delete it
Undefined Symbol "pName" means you using the pName without the Function

__________________
Next Life Roleplay [Refunding/Hiring]
SERVER IP: 172.245.220.133:7108
http://nextlife-rp.boards.net/



Re: little help - Ironboy - 11.01.2015

Use this

pawn Код:
public OnPlayerConnect(playerid)
{   new pmess[256],IP[256], name[MAX_PLAYER_NAME];
    GetPlayerName(playerid, name, sizeof(name));
    GetPlayerIp(playerid,IP,sizeof(IP));
    printf("%s has joined the server. Country: %s | IP Address: %s",name, GetPlayerCountryName(playerid),IP);
    format(pmess,sizeof(pmess), ""COL_RED"%s"COL_WHITE" has joined the server from "COL_RED"%s.", name, GetPlayerCountryName(playerid));
    SendClientMessageToAll(-1, pmess);
    GameTextForPlayer(playerid, "~g~Welcome ~r~to ~p~Samp~y~Drifting ~b~Community", 5000, 6);
    return 1;
}



Re: little help - mahdi499 - 11.01.2015

pawn Код:
public OnPlayerConnect(playerid)
{   new pmess[128], IP[256], name[MAX_PLAYER_NAME];
    GetPlayerName(playerid, name, sizeof(name));
    GetPlayerIp(playerid,IP,sizeof(IP));
    printf("%s has joined the server. Country: %s | IP Address: %s",name, GetPlayerCountryName(playerid),IP);
    format(pmess,sizeof(string), ""COL_RED"%s"COL_WHITE" has joined the server from "COL_RED"%s.", name, GetPlayerCountryName(playerid));
    SendClientMessageToAll(-1, pmess);

    GameTextForPlayer(playerid, "~g~Welcome ~r~to ~p~Samp~y~Drifting ~b~Community", 5000, 6);
    return 1;
}
Untested