Invalid String 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: Invalid String Errors (
/showthread.php?tid=585256)
Invalid String Errors -
Rokzlive - 12.08.2015
Im getting some crazy errors on some strings in my spawn menu function that i am building. I cannot seem to determine what is causing them.
Help resolving this would be appreciated.
Errors:
Код:
C:\Users\Nick\Desktop\newserver\pawno\include\TN_SPAWNMENU.inc(64) : error 037: invalid string (possibly non-terminated string)
C:\Users\Nick\Desktop\newserver\pawno\include\TN_SPAWNMENU.inc(64) : error 017: undefined symbol "Location"
C:\Users\Nick\Desktop\newserver\pawno\include\TN_SPAWNMENU.inc(64) : error 029: invalid expression, assumed zero
C:\Users\Nick\Desktop\newserver\pawno\include\TN_SPAWNMENU.inc(64) : fatal error 107: too many error messages on one line
Code:
pawn Код:
public LoadSpawnMenu(playerid)//LINE 60
{
new String[1000];
new TempString[60];
format(String,sizeof(String),"Location\tSlots(House Only)\n\");
for (new i=1; i < MAX_SPAWNPOINTS; i++)//LINE 65
{
if(TN_SPData[i][Security] == TN_pData[playerid][UserLevel])
{
format(TempString,sizeof(TempString),"%s\tNone\n\",TN_SPData[i][Name]);
strins(String,TempString,1);//LINE 70
}
}
for (new i=1; i < MAX_HOUSES; i++)
{
if(IsHouseOwnedByPlayer(playerid, i))//LINE 75
{
}
}
return 1;//LINE 80
}
Re: Invalid String Errors -
SickAttack - 12.08.2015
Change this "format(String,sizeof(String),"Location\tSlots(Hou se Only)\n\");" to "format(String,sizeof(String),"Location\tSlots(Hou se Only)\n");"
\" = Escaped character.
Re: Invalid String Errors -
Rokzlive - 12.08.2015
Dang. Wow. I feel properly stupid now. Thanks!