Jump to content
  • 0

Problema...Va rog ajutor ...


NEoNX

Question

Deci am chestia asta :

[pawn]//KillingSpree

    new DBResult:Result, Field[ 50 ], string[266];

format(Query,256,"SELECT `Key` FROM `KSDatabase` WHERE `Nume` = '%s'",PlayerZzName(playerid);

Result = db_query( Database, Query );

if ( db_num_rows( Result ) )

{

    db_get_field_assoc( Result, "KillingSpree", Field, sizeof( Field ) );

KillingSpree{ playerid } = strval( Field );

db_get_field_assoc( Result, "BestKillingSpree", Field, sizeof( Field ) );

bKillingSpree{ playerid } = strval( Field );

}

else

{

    format( Query, 256, "INSERT INTO `KSDatabase` VALUES(NULL,'%s','%d','%d')", PlayerZzName( playerid ), 0, 0 );

    db_free_result( db_query( Database, Query ) );

    KillingSpree{ playerid } = 0;

    bKillingSpree{ playerid } = 0;

}

db_free_result( Result );[/pawn]

Si imi da urmatoarele erori... :

[pawn]C:\Documents and Settings\13liviu\My Documents\Descãrcãri\filehost_sssssssssssssssssssssssssss\sssssssssssssssssssssssssss\gamemodes\EoS.pwn(3551) : error 012: invalid function call, not a valid address

C:\Documents and Settings\13liviu\My Documents\Descãrcãri\filehost_sssssssssssssssssssssssssss\sssssssssssssssssssssssssss\gamemodes\EoS.pwn(3551) : warning 215: expression has no effect

C:\Documents and Settings\13liviu\My Documents\Descãrcãri\filehost_sssssssssssssssssssssssssss\sssssssssssssssssssssssssss\gamemodes\EoS.pwn(3551) : error 001: expected token: ";", but found ")"

C:\Documents and Settings\13liviu\My Documents\Descãrcãri\filehost_sssssssssssssssssssssssssss\sssssssssssssssssssssssssss\gamemodes\EoS.pwn(3551) : error 029: invalid expression, assumed zero

C:\Documents and Settings\13liviu\My Documents\Descãrcãri\filehost_sssssssssssssssssssssssssss\sssssssssssssssssssssssssss\gamemodes\EoS.pwn(3551) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase

4 Errors.

[/pawn]

si linia 3551 este :

[pawn]format(Query,256,"SELECT `Key` FROM `KSDatabase` WHERE `Nume` = '%s'",PlayerZzName(playerid);[/pawn]

Link to comment
Share on other sites

7 answers to this question

Recommended Posts

[pawn]    new DBResult:Result2, Field[ 50 ];

format( Query2, 256, "SELECT `Key` FROM `KSDatabase` WHERE `Nume` = '%s'", plname( playerid ) );

Result2 = db_query( Database2, Query2 );

if ( db_num_rows( Result2 ) )

{

    db_get_field_assoc( Result2, "KillingSpree", Field, sizeof( Field ) );

KillingSpree{ playerid } = strval( Field );

db_get_field_assoc( Result2, "BestKillingSpree", Field, sizeof( Field ) );

bKillingSpree{ playerid } = strval( Field );

format( stringgg, 128, "You are in {FF9900}%d {FFFFFF}Killing Spree!", KillingSpree{ playerid } );

SendClientMessage( playerid, 0xFFFFFFFF, stringgg );

format( stringgg, 128, "Your best killing spree is: {FF9900}%d{FFFFFF}.", bKillingSpree{ playerid } );

SendClientMessage( playerid, 0xFFFFFFFF, stringgg );

}

else

{

    format( Query2, 256, "INSERT INTO `KSDatabase` VALUES(NULL,'%s','%d','%d')", plname( playerid ), 0, 0 );

    db_free_result( db_query( Database2, Query2 ) );

    KillingSpree{ playerid } = 0;

    bKillingSpree{ playerid } = 0;

}

db_free_result( Result2 );[/pawn]

Result2 faci Result.

Query2 faci Query .

Pentru a functiona bine xD

idiots.png
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.