Format Error
#1

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.
Reply
#2

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)