Format Error - 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: Format Error (
/showthread.php?tid=447326)
Format Error -
Rokzlive - 29.06.2013
For some reason i get tons of errors when trying to do this.
pawn Код:
format(mInfo[playerid][FName],sizeof(mInfo[playerid][FName]),"%s",MPRand[LoadPointID][Name]);
C:\Users\Nickolas\Desktop\samp03x_svr_R1-2_win32\gamemodes\missionscriptnew.pwn(307) : error 001: expected token: "]", but found "-identifier-"
C:\Users\Nickolas\Desktop\samp03x_svr_R1-2_win32\gamemodes\missionscriptnew.pwn(307) : warning 215: expression has no effect
C:\Users\Nickolas\Desktop\samp03x_svr_R1-2_win32\gamemodes\missionscriptnew.pwn(307) : error 001: expected token: ";", but found "]"
C:\Users\Nickolas\Desktop\samp03x_svr_R1-2_win32\gamemodes\missionscriptnew.pwn(307) : error 029: invalid expression, assumed zero
C:\Users\Nickolas\Desktop\samp03x_svr_R1-2_win32\gamemodes\missionscriptnew.pwn(307) : 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: Format Error -
Goldilox - 29.06.2013
Get the length of
mInfo[playerid][FName] by using strlen and put it into a variable and then use that variable in the format. That might work.