Does anyone know how to fix the TraderRequestSell().
This function always returns false. I do not think that it is reading the correct
memory. Can someone verify that this function does not work, and is there someone who has the ability to fix it?
This function always returns false. I do not think that it is reading the correct
memory. Can someone verify that this function does not work, and is there someone who has the ability to fix it?
Do you stand at the Trader, when you try to sell an item?
Yes, I was right next to the trader and I did not move away at any time. This function has never worked for me. Buying works, selling does not.
Should have said I am Using 3.7.11 of the GWA2.
I checked the GWA2 code and the TraderRequestSell() is expecting an ItemID which
I have successfully passed to it, verified, by outputting to the console.
Yes, I was right next to the trader and I did not move away at any time. This function has never worked for me. Buying works, selling does not.
Should have said I am Using 3.7.11 of the GWA2.
I checked the GWA2 code and the TraderRequestSell() is expecting an ItemID which
I have successfully passed to it, verified, by outputting to the console.
I use the version from - same version number as you, but might be worth re-downloading just to re-test.
Are you passing an Item ID, Item Struct, or Item Pointer to the function?
Is there a delay (~5 secs) between calling the function and getting the False response, or is it pretty much instant?
Also, make sure you can see that the relevent trader's window is open when you call TraderRequestSell()
I am passing the item ID to the function. Looking at the code in GWA2 , that is what it wants.
The deadlock timer is functioning correctly and waiting 5 seconds before returning false.
Well, I think I found the problem. The ItemID is changing everytime you sell from the stack in your inventory requiring you to create the ItemStruct again and pull the ItemID from it again. I got a sell operation to work after this.
I am passing the item ID to the function. Looking at the code in GWA2 , that is what it wants.
The deadlock timer is functioning correctly and waiting 5 seconds before returning false.
Well, I think I found the problem. The ItemID is changing everytime you sell from the stack in your inventory requiring you to create the ItemStruct again and pull the ItemID from it again. I got a sell operation to work after this.
Item ID changing doesn't sound right, it should stay the same and only the quantity should change, otherwise its not a stack.
What were you selling? Were you calling TraderRequestSell then TraderSell for every item in the stack?
I did not think the ItemID would change either , but , that is what I was seeing.
I output the 'ItemID' to the console on every iteration to verify it. Note: I was
selling multiple times from the same stack of Plant fibers. Yes , I was using
TraderRequestSell() followed by TraderSell().
I know you found a workaround for it but its interesting that it changes every time. The only thing I can think of is you're passing the item ID of the Merchant's sellable version of the item, not the item that is from your own inventory.
Func TraderRequestSellByCoords($TraderCoords)
Local $ModelIdValue = GetItemBySlot(1,1)
Local $Item = GetItemBy('ModelId',$ModelIdValue)
Local $ItemQuantity = Floor(Round(GetItemProperty($Item, 'Quantity') / 10,1))
Local $Trader = GetNearestAgentToCoords($TraderCoords[0], $TraderCoords[1])
GoToNPC ($Trader)
For $i = 0 To $ItemQuantity
Sleep (GetPing()+100)
TraderRequestSell($Item)
Sleep(GetPing()+100)
TraderSell()
Next
EndFunc
I made this function quickly at work, so it might contain little errors.
Make sure you replace the value of $ModelIdValue with i.e. $ModelIdValue = 2903, as of now we just pass the ModelId of the first item in our Backpack.
I could not test this, but i think the problem here is that we don't need to pass the ModelId to the Trader. The TraderRequestSell() function wants us to pass the $aItem Value of the GetItemBy() function.
Does anyone know how to fix this? 12/08/2015 - Shaiya PServer Development - 1 Replies hey guys i got problem >.<
2011-03-09 11:01:11 err=-1, Server 'PS_USERDB01' is not configured for RPC., SQL STATE: 42000, NATIVE ERROR: 7411 (0x1CF3)
2011-03-09 11:01:11 ::SaveCharacter 236 test ret=1, qerr=-1, {?=call usp_Save_Char_Info_E(236,1, 0,5, 14,12,9,8,7,15, 250,85,195, 1,0, 0,0, 577.979980,78.559998,1762.119995, 0,200,0,0,0, 0,0,0,0, 0,0)}
2011-03-09 11:16:02 err=-1, Server 'game' is not configured for RPC., SQL STATE: 42000, NATIVE ERROR: 7411 (0x1CF3)
2011-03-09 11:16:02...