dynamic problem - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: dynamic problem (
/showthread.php?tid=309005)
dynamic problem -
Tanush123 - 05.01.2012
Fixed (so stop fighting

)
Re: dynamic problem -
Tee - 05.01.2012
Post your "GetRuleid();" function.
Edit:
pawn Код:
stock GetRuleid()
{
for(new i=1; i<MAX_RULES; i++)
{
format(query,sizeof(query),"SELECT * FROM Rules WHERE `ID` = %d",i);
mysql_query(query);
mysql_store_result();
if(mysql_num_rows() != 0)return i;
mysql_free_result();
}
return 0;
}
Re: dynamic problem -
TheArcher - 05.01.2012
If your variable is set to " 0 " and you put " 9 " on MAX_RULES variable it will count 8 not 9.
Re: dynamic problem -
Tee - 05.01.2012
Quote:
Originally Posted by TheArcher
If your variable is set to " 0 " and you put " 9 " on MAX_RULES variable it will count 8 not 9.
|
That's what I told him.
Re: dynamic problem -
TheArcher - 05.01.2012
Quote:
Originally Posted by Tee
That's what I told him.
|
You did a example you didn't specify nothing. Anyways i reccomand you to do debugs when you're testing something.
Re: dynamic problem -
Tee - 05.01.2012
Quote:
Originally Posted by TheArcher
You did a example you didn't specify nothing. Anyways i reccomand you to do debugs when you're testing something.
|
I told him on xfire -_-
Re: dynamic problem -
TheArcher - 06.01.2012
Quote:
Originally Posted by Tee
I told him on xfire -_-
|
Let's don't go offtopic and just think. How do i know you told him those things on xfire? He also asked something here and i'm trying to helping him out.