Formatting player variable freaking?
#1

Im trying to format the player variable, playerdata[playerid][info], to equal the string "Use /work to begin a route!" like this:
pawn Код:
format(playerdata[playerid][info],sizeof(playerdata[playerid][info]),"Use /work to begin a route!");
And this cause pawno to flip out.
Код:
C:\Users\Ingo\Desktop\samp03dsvr_R2_win32\gamemodes\ATL.pwn(525) : error 001: expected token: "]", but found "-identifier-"
C:\Users\Ingo\Desktop\samp03dsvr_R2_win32\gamemodes\ATL.pwn(525) : warning 215: expression has no effect
C:\Users\Ingo\Desktop\samp03dsvr_R2_win32\gamemodes\ATL.pwn(525) : error 001: expected token: ";", but found "]"
C:\Users\Ingo\Desktop\samp03dsvr_R2_win32\gamemodes\ATL.pwn(525) : error 029: invalid expression, assumed zero
C:\Users\Ingo\Desktop\samp03dsvr_R2_win32\gamemodes\ATL.pwn(525) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.
What the heck did i do wrong, lol.
Reply
#2

pawn Код:
sizeof(playerdata[playerid][info])
In my experience, you can't do this. I'm not sure why though!
Reply
#3

Huh... thats odd. I guess ill just put in the numbers then xD
Reply
#4

Just replace sizeof(playerdata[playerid][info]) with the size of the enum

Edit: late post
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)