Error at string
#1

Well i confuse with string i have 4 error at 1 line,well this is my script http://pastebin.com/QNmdh02g.

This is an error

Код:
D:\Test server\filterscripts\Orgs.pwn(347) : error 017: undefined symbol "string"
D:\Test server\filterscripts\Orgs.pwn(347) : error 017: undefined symbol "string"
D:\Test server\filterscripts\Orgs.pwn(347) : error 029: invalid expression, assumed zero
D:\Test server\filterscripts\Orgs.pwn(347) : 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

Try to change this, which on top of your script...
pawn Код:
new String[MAX_PLAYERS];
To this one,
pawn Код:
new string[129];
Reply
#3

In these lines you should format the variable String, for example :


This line :


pawn Код:
format(string, sizeof(string), "* %s unholsters his tazer.", PlayerName(playerid));

Should be:


Код:
format(String, sizeof(String), "* %s unholsters his tazer.", PlayerName(playerid));
You must fix theses things , if you do not want to change line per line, just put in the top of your GameMode:


pawn Код:
#define string String

I hope that i have helped .
Reply
#4

Quote:
Originally Posted by rjjj
Посмотреть сообщение
In these lines you should format the variable String, for example :


This line :


pawn Код:
format(string, sizeof(string), "* %s unholsters his tazer.", PlayerName(playerid));

Should be:


Код:
format(String, sizeof(String), "* %s unholsters his tazer.", PlayerName(playerid));
You must fix theses things , if you do not want to change line per line, just put in the top of your GameMode:


pawn Код:
#define string String

I hope that i have helped .
That might be his problem like I said, but if you would look at this variable String[MAX_PLAYERS], he's using MAX_PLAYERS instead of a simple array size of 128 or smaller, then he should change this to:
pawn Код:
new string[128];
But what you say is right, I mean, if he doesn't want to change line per line -.- but he can use FIND NEXT and this isn't that big mod
Reply
#5

Quote:
Originally Posted by EliranPesahov
Посмотреть сообщение
Try to change this, which on top of your script...
pawn Код:
new String[MAX_PLAYERS];
To this one,
pawn Код:
new string[129];
I have many error now...

Код:
D:\GT-RP Script\pawno\include\dini.inc(257) : warning 219: local variable "string" shadows a variable at a preceding level
D:\GT-RP Script\pawno\include\utils.inc(1) : warning 219: local variable "string" shadows a variable at a preceding level
D:\Test server\filterscripts\Okay.pwn(113) : error 017: undefined symbol "String"
D:\Test server\filterscripts\Okay.pwn(113) : error 017: undefined symbol "String"
D:\Test server\filterscripts\Okay.pwn(113) : error 029: invalid expression, assumed zero
D:\Test server\filterscripts\Okay.pwn(113) : fatal error 107: too many error messages on one line
Reply
#6

I fixed and uploaded it to a new pastebin, try this now...
http://pastebin.com/9vL50dYD
Reply
#7

Quote:
Originally Posted by EliranPesahov
Посмотреть сообщение
I fixed and uploaded it to a new pastebin, try this now...
http://pastebin.com/9vL50dYD
Are you compiler that ?
Reply
#8

I didn't compile it if that's what you mean since I don't have these includes, dini and another one.
Just try comiple and tell me what it says.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)