Script errors
#1

Helle there,

I'm getting a few errors.

The errors:

Код:
C:\Users\Aimane_Elbarjaj\Desktop\ES Servr\gamemodes\myserver.pwn(52) : error 037: invalid string (possibly non-terminated string)
C:\Users\Aimane_Elbarjaj\Desktop\ES Servr\gamemodes\myserver.pwn(52) : error 017: undefined symbol "s"
C:\Users\Aimane_Elbarjaj\Desktop\ES Servr\gamemodes\myserver.pwn(52) : error 029: invalid expression, assumed zero
C:\Users\Aimane_Elbarjaj\Desktop\ES Servr\gamemodes\myserver.pwn(52) : fatal error 107: too many error messages on one line
The line:

Код:
 format(string,sizeof(string),PATH,playername);
Can someone help me?
Reply
#2

What do you want to do with that code?
Reply
#3

Wait, here is the whole code:

Quote:

stock UserPath(playerid)
{
new string[128],playername[MAX_PLAYER_NAME];
GetPlayerName(playerid,playername,sizeof(playernam e));
format(string,sizeof(string),PATH,playername);
return string;
}

It's a stock function.
Reply
#4

What do you mean by PATH? Do you want just player's name to be returned? If so, you don't need that stock, just use GetPlayerName(playerid, playername, MAX_PLAYER_NAME) and you will have player's name stored into playername variable.
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)