mysql error -
LazyB0y - 03.11.2014
hi all,
I got a MySQL error, anyone know how to fix it?
Код:
C:\Users\-.-\Downloads\Compressed\Project Innovative\Project Innovative\Gamemode\Innovative.pwn(7583) : error 017: undefined symbol "va_return"
C:\Users\-.-\Downloads\Compressed\Project Innovative\Project Innovative\Gamemode\Innovative.pwn(7589) : error 035: argument type mismatch (argument 3)
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
2 Errors.
Line
Код:
StringNumeric(const str[])
{
for(new i = 0,ii = strlen(str);i < ii;i++)
{
if(str[i] > '9' || str[i] < '0') return 0;
}
return 1;
}
Re: mysql error -
Eth - 03.11.2014
try this:
pawn Код:
StringNumeric(const str[])
{
for(new i = 0,ii = strlen(str);i < ii;i++)
{
if(str[i] > 9 || str[i] < 0) return 0;
}
return 1;
}
Re: mysql error -
CutX - 03.11.2014
Quote:
Originally Posted by Eth
try this:
pawn Код:
StringNumeric(const str[]) { for(new i = 0,ii = strlen(str);i < ii;i++) { if(str[i] > 9 || str[i] < 0) return 0; } return 1; }
|
if u'd use decimal 9 and 0, the line is the same as:
if char > TAB OR char < NULL
thats not what we want here.
we want to detect numbers, starting from
decimal 48('0') to 57('9')
the correct way to do that would be
pawn Код:
StringNumeric(const str[])
{
for(new i = 0,ii = strlen(str);i < ii;i++)
{
if(str[i] > '0' && str[i] < '9') return 1;
}
return 0;
}
pawn Код:
printf("str: %d",StringNumeric("tms"));
output "str: 0"
pawn Код:
printf("str: %d",StringNumeric("tm5s"));
output "str: 1"
also, instead of calling a function, why not use whats already there by default.
like EOS
the head with the new condition would look like
pawn Код:
for(new i = 0;str[i]!=EOS;i++)
and it'll still work the same, even faster ^^
not that it mathers though...
Re: mysql error -
LazyB0y - 04.11.2014
i gave wrong the correct line
Код:
stock SendClientMessageEx(playerid, color, const form[], va_args<>)
return SendClientMessage(playerid, color, va_return(form, va_start<3>));
stock SendClientMessageToAllEx(colour, const fmat[], va_args<>)
{
new
str[145];
va_format(str, sizeof (str), fmat, va_start<2>);
return SendClientMessageToAll(colour, str);
}
Sorry!
Re: mysql error -
Vince - 04.11.2014
How is this at all related to MySQL? I suggest you ask in the y_vars topic.
Re: mysql error -
LazyB0y - 04.11.2014
uhm before I got a a_MySQL.inc which gave 26 errors and now my friend gave me a new one a_mysql which have only 2 errors so isn't it related to MySQL :/?
Re: mysql error -
Runn3R - 04.11.2014
None of these errors are related to the MySQL itself.
Re: mysql error -
LazyB0y - 04.11.2014
hmm okay.. so you know how to fix them?plz?i need them?
Re: mysql error -
Runn3R - 04.11.2014
Like Vince said:
Quote:
Originally Posted by Vince
How is this at all related to MySQL? I suggest you ask in the y_vars topic.
|
And also check the y_vars tutorials on the forums.
Re: mysql error -
LazyB0y - 04.11.2014
okaywhats y_vars and where I can find it?