#1

Hello I got problems with this

pawn Код:
new Text:Zero[MAX_PLAYERS];

Zero[playerid] = TextDrawCreate(42.000000, 317.000000, "00000000");
    TextDrawBackgroundColor(Zero[playerid], 255);
    TextDrawFont(Zero[playerid], 3);
    TextDrawLetterSize(Zero[playerid], 0.539999, 2.299999);
    TextDrawColor(Zero[playerid], -86501633);
    TextDrawSetOutline(Zero[playerid], 1);
    TextDrawSetProportional(Zero[playerid], 1);
ERRORS

Код:
D:\SWAT\samp03dsvr_win32(1)\gamemodes\Reg.pwn(189) : error 017: undefined symbol "playerid"
D:\SWAT\samp03dsvr_win32(1)\gamemodes\Reg.pwn(190) : error 017: undefined symbol "playerid"
D:\SWAT\samp03dsvr_win32(1)\gamemodes\Reg.pwn(191) : error 017: undefined symbol "playerid"
D:\SWAT\samp03dsvr_win32(1)\gamemodes\Reg.pwn(192) : error 017: undefined symbol "playerid"
D:\SWAT\samp03dsvr_win32(1)\gamemodes\Reg.pwn(193) : error 017: undefined symbol "playerid"
D:\SWAT\samp03dsvr_win32(1)\gamemodes\Reg.pwn(194) : error 017: undefined symbol "playerid"
D:\SWAT\samp03dsvr_win32(1)\gamemodes\Reg.pwn(195) : error 017: undefined symbol "playerid"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


7 Errors.
Reply
#2

Where did you write that code? In a function? Put all the code. You might have wrote that in a function where you don't pass playerid as a parameter
Reply
#3

Quote:
Originally Posted by DreamOnIt
Посмотреть сообщение
Where did you write that code? In a function? Put all the code. You might have wrote that in a function where you don't pass playerid as a parameter
I putted it in OnGameModeInit......
Reply
#4

Wrong
Add it OnPlayerConnect or Spawn
Reply
#5

You can't do that on OnGameModeInit, it's not the callback's function
Reply
#6

Quote:
Originally Posted by DreamOnIt
Посмотреть сообщение
You can't do that on OnGameModeInit, it's not the callback's function
But When I delete "[playerid]"I get errors like

Код:
D:\SWAT\samp03dsvr_win32(1)\gamemodes\Reg.pwn(189) : error 033: array must be indexed (variable "Zero")
D:\SWAT\samp03dsvr_win32(1)\gamemodes\Reg.pwn(190) : error 035: argument type mismatch (argument 1)
D:\SWAT\samp03dsvr_win32(1)\gamemodes\Reg.pwn(191) : error 035: argument type mismatch (argument 1)
D:\SWAT\samp03dsvr_win32(1)\gamemodes\Reg.pwn(192) : error 035: argument type mismatch (argument 1)
D:\SWAT\samp03dsvr_win32(1)\gamemodes\Reg.pwn(193) : error 035: argument type mismatch (argument 1)
D:\SWAT\samp03dsvr_win32(1)\gamemodes\Reg.pwn(194) : error 035: argument type mismatch (argument 1)
D:\SWAT\samp03dsvr_win32(1)\gamemodes\Reg.pwn(195) : error 035: argument type mismatch (argument 1)
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


7 Errors.
Reply
#7

Quote:
Originally Posted by Rudy_
Посмотреть сообщение
Add it OnPlayerConnect or Spawn
This
Reply
#8

Quote:
Originally Posted by Rudy_
Посмотреть сообщение
Wrong
Add it OnPlayerConnect or Spawn
Aha lets see
Reply
#9

Do not delete 'playerid'
Copy paste the code exactly how it is and place it under OnPlayerConnect or OnPlayerSpawn, or any other callback that has "playerid" as a parameter in it, then compile, it'll be fine.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)