2 issues
#1

1.Something weird is going on,I made a new arguments - d,m and y,but it still gives me this errors:
PHP код:
warning 219local variable "y" shadows a variable at a preceding level
error 035
argument type mismatch (argument 1)
warning 203symbol is never used"y" 
Here are the lines:
PHP код:
new d,m,ygetdate(y,m,d); 
Why do I still get those errors?


2.I have the function strval_fix in the string.inc include,but I still get those errors:
PHP код:
error 017undefined symbol "strval_fix" 
Could someone help me?
Thanks
Reply
#2

Shadowing: you already have the "y" variable somewhere, so you don't need the "new y;" or whatever u did.

About strval_fix, you are probbably using it before including string.inc.
Reply
#3

1) You already have variable 'y' defined within the scope of the declaration. Either give it another name or use the one that is already created if possible.
2) Would need to see the function, and have you tried adding it to your code and not an include to see if that works?

Edit: I don't edit the includes that come with the server package, i did once and forgot how many functions i added. Then when i give some code to my freind for his server he could not compile it due to lack of functions. So i never edit them now. I guess its ok, if your not releasing it. Otherwise you would need to distribute the custom include with your script.
Reply
#4

Quote:
Originally Posted by Mean
Посмотреть сообщение
Shadowing: you already have the "y" variable somewhere, so you don't need the "new y;" or whatever u did.

About strval_fix, you are probbably using it before including string.inc.
Quote:
Originally Posted by iggy1
Посмотреть сообщение
1) You already have variable 'y' defined within the scope of the declaration. Either give it another name or use the one that is already created if possible.
2) Would need to see the function, and have you tried adding it to your code and not an include to see if that works?

Edit: I don't edit the includes that come with the server package, i did once and forgot how many functions i added. Then when i give some code to my freind for his server he could not compile it due to lack of functions. So i never edit them now. I guess its ok, if your not releasing it. Otherwise you would need to distribute the custom include with your script.
1.Yes,error fixed,I couldn't find another y so I made new year,month,date; instead of y,m,d
2.I put this in the top of the mode with all other includes:
PHP код:
#include <string> 
But I still have those errors
Any ideas?
Reply
#5

Bump
Reply
#6

Are you running your script by double clicking PWN or going to pawno.exe?
Reply
#7

Use
Код:
new strval_fix;
Reply
#8

Quote:
Originally Posted by [DJ]Boki
Посмотреть сообщение
Use
Код:
new strval_fix;
That will just hide that warning and probably cause more, if its being used as a function call. (if it is a function that is)

@Montserrat Try putting the function "strval_fix" in your code and not the include, and post the function "strval_fix" here please.

BTW is strval_fix a function or a variable? Says function in the first post so i guess it is a function.
Reply
#9

Quote:
Originally Posted by [DJ]Boki
Посмотреть сообщение
Use
Код:
new strval_fix;

It's a Function, not a Variable. This will MAYBE hide the warnings, but it will not work.

EDIT: Slow.
Reply
#10

Quote:
Originally Posted by Mean
Посмотреть сообщение
Are you running your script by double clicking PWN or going to pawno.exe?
Umm.. what?
I click on my mode and then it open pawno with my mod
Reply
#11

Quote:
Originally Posted by Montserrat
Посмотреть сообщение
Umm.. what?
I click on my mode and then it open pawno with my mod
And yes that's the problem, go to your server > pawno > pawno.exe, and go to OPEN > and open your PWN file, that is the problem. You are probbably running the OLD pawno in the Open With. So you need to click on pawno.exe.
Reply
#12

Quote:
Originally Posted by Mean
Посмотреть сообщение
And yes that's the problem, go to your server > pawno > pawno.exe, and go to OPEN > and open your PWN file, that is the problem. You are probbably running the OLD pawno in the Open With. So you need to click on pawno.exe.
I've had previous errors so I already updated the pawno version.
But let me try
Edit: nope still have those errors
Reply
#13

Bump
Reply
#14

Bump.. Please help!
I can not do anything in my mode untill I fix those errors
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)