[Help] error 025: function heading differs from prototype - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [Help] error 025: function heading differs from prototype (
/showthread.php?tid=248552)
[Help] error 025: function heading differs from prototype -
FinestCalis - 14.04.2011
I get error when i compile my script - What's wrong with this line?
Quote:
error 025: function heading differs from prototype
|
Quote:
public OnQueryFinish( query[], resultid, extraid, connectionHandle ) {
|
Re: [Help] error 025: function heading differs from prototype -
xRyder - 14.04.2011
You have to have
the same parameters when you forward that function.
Re: [Help] error 025: function heading differs from prototype -
Calgon - 14.04.2011
Change that line to:
pawn Код:
public OnQueryFinish(query[], index, extraid, connectionHandle) {
The public retained a different variable ('index' was missing and 'resultid' was added to replace it, you need to stick to the defaults from the include, or change the include/plugin).
Re: [Help] error 025: function heading differs from prototype -
FinestCalis - 14.04.2011
First of all, thanks for answering!
When i add this i get one error more:
Quote:
error 025: function heading differs from prototype
error 017: undefined symbol "resultid"
|
The whole stuff is this
Quote:
public OnQueryFinish(query[], index, extraid, connectionHandle) {
switch(resultid) {
case MYSQL_SAVE_VEHICLES: {
}
case MYSQL_SAVE_USERS: {
}
case MYSQL_LOAD_OOC_ROOMS: {
mysql_store_result();
if(mysql_num_rows() == 0) {
print("No chatrooms in the database! Creating OOC Rooms!");
for(new i = 0; i < TOTAL_OOCROOMS; i ++ ) {
mysql_query("INSERT INTO OOCRooms (Owned, Locked, Owner, Password, Owner) VALUES(0,0,'None','None', 'None')");
printf("Created OOC room %i | Data: Owned: False, Locked: False, Owner: None, Password: None", i);
}
}
|
Re: [Help] error 025: function heading differs from prototype -
Calgon - 14.04.2011
Change switch(resultid) to switch(index)
Re: [Help] error 025: function heading differs from prototype -
FinestCalis - 14.04.2011
Now I can start over
Quote:
025: function heading differs from prototype
|
On the same line
Quote:
public OnQueryFinish(query[], index, extraid, connectionHandle) {
|