SA-MP Forums Archive
Script errors - 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: Script errors (/showthread.php?tid=525487)



Script errors - aimane65 - 12.07.2014

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?


Respuesta: Script errors - Xabi - 12.07.2014

What do you want to do with that code?


Re: Script errors - aimane65 - 12.07.2014

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.


Respuesta: Script errors - Xabi - 12.07.2014

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.