Getting an error involving MySQL
#1

When I try to use a new version of MySQL (some version above R7) the compiler gives me a lot of errors when I try to compile my gamemode:
Код:
warning 219: local variable "str" shadows a variable at a preceding level
warning 219: local variable "str" shadows a variable at a preceding level
warning 219: local variable "str" shadows a variable at a preceding level
warning 219: local variable "str" shadows a variable at a preceding level
warning 219: local variable "str" shadows a variable at a preceding level
warning 219: local variable "str" shadows a variable at a preceding level
warning 219: local variable "str" shadows a variable at a preceding level
warning 219: local variable "str" shadows a variable at a preceding level
warning 219: local variable "str" shadows a variable at a preceding level
warning 219: local variable "str" shadows a variable at a preceding level
warning 219: local variable "str" shadows a variable at a preceding level
warning 219: local variable "str" shadows a variable at a preceding level
warning 219: local variable "str" shadows a variable at a preceding level
warning 219: local variable "str" shadows a variable at a preceding level
warning 219: local variable "str" shadows a variable at a preceding level
error 021: symbol already defined: "mysql_escape_string"
error 001: expected token: "=", but found "["
error 021: symbol already defined: "mysql_escape_string"
error 010: invalid function or declaration
error 017: undefined symbol "mysql_function_query"
warning 219: local variable "str" shadows a variable at a preceding level
warning 219: local variable "str" shadows a variable at a preceding level
warning 219: local variable "str" shadows a variable at a preceding level
warning 219: local variable "str" shadows a variable at a preceding level
warning 219: local variable "string" shadows a variable at a preceding level
warning 219: local variable "str" shadows a variable at a preceding level
error 028: invalid subscript (not an array or too many subscripts): "string"
error 029: invalid expression, assumed zero
error 028: invalid subscript (not an array or too many subscripts): "string"
fatal error 107: too many error messages on one line
If I try to compile the gamemode with MySQL Plugin version R7, I don't get these errors, I only get these errors if I change my MySQL for other version different of R7. Can somebody help me with this error? I opened "a_mysql" to check it and I didn't find nothing wrong. I tested with many other versions of MySQL plugin and always I got these errors with versions above of R7.
Reply
#2

Are the errors coming from your gamemode, or from an include? If they're coming from your gamemode, provide the code please; we can't see what you've done wrong without the code.

str is a common string variable and can conflict with existing includes / code libraries if incorrectly implemented in your own code.
Reply
#3

Anything above R7 is not backward compatible with R7. You cannot just plop in R41 and expect it to still work.
Reply
#4

Quote:
Originally Posted by Luke_James
Посмотреть сообщение
Are the errors coming from your gamemode, or from an include? If they're coming from your gamemode, provide the code please; we can't see what you've done wrong without the code.

str is a common string variable and can conflict with existing includes / code libraries if incorrectly implemented in your own code.
I don't know from where and why is coming this error, the include file (a_mysql.inc) and the gamemode are ok.
Usually that error is caused due unclosed brackets, I guess, and there are not unclosed brackets.

Quote:
Originally Posted by Vince
Посмотреть сообщение
Anything above R7 is not backward compatible with R7. You cannot just plop in R41 and expect it to still work.
I tried R38 version out too and I still got this error. Maybe would be normal getting errors like "undefined symbol..." due to the name of functions have been changed, but I got errors even in other include.
Reply
#5

Sorry, I didn't read the OP in the first place, just the errors.

You can't upgrade from R7 to R3x/40+ without making significant changes to your code, there are plenty of guides and tutorials on the forum which comprehensively show you the changes you need to make.
Reply
#6

Damn, so I'll back to use R7 version. Thank you both for intention in helping
Reply
#7

... or you can update your code
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)